On 17 Feb 2010, at 09:41, Wimpie Nortje wrote:

I have a C library that uses threads. These threads use callbacks into my pascal for events. What must happen for the pascal events handlers to be able to safely access the main thread's resources?

The same as what must happen for C event handlers to access those resources.

This is the same situation where I would use TThread.Synchronize if the threads were TThread objects.

Then you must implement such a mechanism in the C program as well, or some other way to synchronise with its main thread.


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to