[fpc-pascal] Can a library synchronize foreign procedure ?

Fred van Stappen fiens at hotmail.com
Wed Feb 12 20:55:15 CET 2014


>But as TThread is an Object and Objects are implemented on the heap,
    I 
>suppose that you need synchronized heaps between the library and
    the 
>main program. 

Exactly, that is what i want...

    

    >AFAIK, there is a way to have a library (if written with fpc)
    "attach" to the 
>main program's heap, but I don't know how this is
    done. 

    

    > Another way would be to define the complete Thread object in the
    main
> program and from there just call normal (flat) functions in the
    library, but I
> suppose this is not what you intend. 

    
Hum, not really, i prefer to let the threat-job done by the library, not ask to the developer to reinvent the hot water... ;-)

So, what i will do (till i find a other solution), is to use a timer inside the main program who will check, calling the library, if there is something to be executed...

Many thanks Michael.

Fred

    

    

  


_______________________________________________
fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140212/28b86400/attachment.html>


More information about the fpc-pascal mailing list