[fpc-devel] TThread.WaitFor delay

Henry Vermaak henry.vermaak at gmail.com
Thu May 30 16:54:08 CEST 2013


Hi list

When I call TThread.WaitFor, I almost always get a 100ms delay,
presumably due to the CheckSynchronize(100) here:

http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/unix/tthread.inc?view=markup#l296

Is it feasible to add an extra check so that this doesn't happen when
FOnTerminate isn't assigned and DoSynchronizeMethod is false?

Also, it looks like spinning on FFinished like this can get you into
trouble with cpu re-ordering, or am I missing something?

Henry



More information about the fpc-devel mailing list