On 26.05.2014 21:47, fredvs wrote:
Yep, Michael, thanks... Ok then for Nil owner... Hum, checksynchronize(), i do not realy understand how to use in the thread/loop... In the loop i do not use synchronize, because the procedure that is called is a java/method and synchronize is for procedure of object outside the thread... (Or i miss something ).
CheckSynchronize is used to process calls to TThread.Synchronize and TThread.Queue. It *must* be called in the context of the main thread (the thread that loaded the library). TFPTimer uses Synchronize internally, because it uses a thread to keep track of the timing and notifies the main thread using Synchronize. Maybe one could add a non-synchronize mode, then oneself would need to make sure that eventual accesses inside the event handler are synchronized (CritialSections, etc.) correctly.
Regards, Sven _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal