[fpc-pascal] Synchronize(dummyproc) with Linux.
Michael Van Canneyt
michael at freepascal.org
Thu May 2 15:13:26 CEST 2013
On Thu, 2 May 2013, Fred van Stappen wrote:
> @ sven : Many thanks for answer ( and of course i had read and study deeply your clear earlier topic ).
> >So even if your method is empty there will be a delay until the mainthread processes the synchronized method.
> Ok, difficult to understand that a empty method gives a delay, but if it is a axiom, nothing to understand, i have to accept it . Many thanks.
This is not an axiom, but simply a consequence of the definition of Synchronize().
Synchronize submits a procedure for execution by the main thread, and waits till the main thread has processed it.
Nowhere does it state that this will be done immediatly.
The code in the main thread is responsible for checking at regular intervals if a procedure was scheduled, and if so, execute it.
More information about the fpc-pascal