On Wed, Apr 24, 2013 at 3:53 AM, Sven Barth <pascaldra...@googlemail.com>wrote:

> That's ok, because the FHandle is information which is retrieved in the
> context of the calling thread (e.g. the main thread). And if we don't need
> any more information about the thread we just close it's handle (equivalent
> to CloseThread) and be done with it. EndThread on the other hand is called
> in the context of the called thread.
>
> Afterall you also normally close the thread handle which you get returned
> by a CreateProcess(?) call, but keep the process handle around.
>
> With CloseHandle (and the semantically equal CloseThread) you just tell
> the system that you don't plan to interact with the object that the handle
> references (in this case a thread) anymore.


Make sense, got it. Thank you.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to