[fpc-pascal] C thread callbacks

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Feb 17 10:47:09 CET 2010

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  

> 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.


More information about the fpc-pascal mailing list