Yes , and it works well on Linux. I use it on a circular (ring) buffer where the main program reads data from the circular buffer and increments the read index while a totally random thread reads data from an incoming Ethernet UDP , serial port or a custom hardware port , writes to the circular buffer and increments the write index.
The functions used are : procedure ResetEvent; procedure SetEvent; function WaitFor(); // one of the events in your program READ or WRITE must wait until the other event finishes. The condition for a read of the circular buffer is WriteIndex <> ReadIndex which is in the main loop (not a thread) which is continuously polled in the main loop. Hope this helps. I can send a code clip but not until next week (out of the office) , showing how it is configured. -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal