Le 09/02/2012 10:36, Michael Schnell a écrit :
On 02/09/2012 09:22 AM, Antonio Fortuny wrote:


TEventObject in syncobjs unit does exactly the job.

The documentation on TEventObject suggest that it is for synchronizing multiple threads of a single process and not for synchronizing multiple independently running processes.
I've made a test on Win32 and the TEventObject is blocking system wide. Three instances af the same program are running (which means three independent processes) using the same named TEventObject. The first acquiring te event locks it for the two other whichever is the blocking process. This means that the TEventObject uses is managed by the OS at the kernel level.
I'll port the name test on WIN64 and Linux64 to see what happens.
The documentation says:
"/Other threads that wish to be notified of these events should create their own instances of TEventObject with the same name, and wait for events to arrive/." which in turn suggests that any thread insterested in a names event must have its own instance of the object
Anyway, it appears to work.

Antonio.


-Michael

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to