[fpc-pascal] TThread.FreeOnTerminate

Jonas Maebe jonas at freepascal.org
Fri Dec 14 20:55:48 CET 2018

On 14/12/18 19:56, Luca Olivetti wrote:
> I also read the manual page for pthread_cancel and even when using 
> pthread_canceltype(PTHREAD_CANCEL_AYNCHRONOUS) "The thread can be 
> canceled at any time.  (Typically, it will be canceled immediately upon 
> receiving a cancellation request, but the system doesn't guarantee this.)".

This also depends on the operating system. Some systems will never 
asynchronously cancel a thread, and will only do so at cancellation 
points (= places where pthread_testcancel gets called). This is 
perfectly valid according to the standard.


More information about the fpc-pascal mailing list