[fpc-pascal] Main thread wait and CheckSynchronize
jonas.maebe at elis.ugent.be
Sun May 16 16:01:29 CEST 2010
On 14 May 2010, at 00:18, Roland Schaefer wrote:
> Now, instead of busy waiting in the main thread loop (even with a Sleep
> inserted), I'd rather have it idle wait until another thread needs to
> synchronize. Is that possible?
CheckSynchronize has a parameter "timeout" with the default value 0: http://www.freepascal.org/docs-html/rtl/classes/checksynchronize.html
You can pass a different value to wait for a longer period of time (specify the number of milliseconds). There is no equivalent of "wait forever" though.
More information about the fpc-pascal