[Lazarus] local procedure - MultiThreadProc

Florian Klaempfl florian at freepascal.org
Thu Aug 20 15:59:34 CEST 2009


Mattias Gaertner schrieb:
> On Wed, 19 Aug 2009 20:52:41 +0200
> Florian Klaempfl <florian at freepascal.org> wrote:
> 
>> Mattias Gaertner schrieb:
>>>> You can create a thread call for local procedures, it needs some
>>>> hacking though: no type checking is possible, you've to work with
>>>> pointers and pass the context explicitly.
>>> Can you give an example?
>> See
>> http://www.freepascal.org/docs-html/rtl/objects/callpointerlocal.html
>>
>> and e.g. the comment of Jonas:
>> (0014130)
>> Jonas Maebe (manager)
>> 2007-08-13 15:02
>> at http://bugs.freepascal.org/view.php?id=9432
> 
> Cool. It really works, at least under linux 32bit. I wonder on what
> other platforms this will work.

objects.pp of FPC uses the same trick (see 
http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/inc/objects.pp?revision=7964&view=markup 
around line 790) so it can be considered as officially supported and 
should work on most platforms.




More information about the Lazarus mailing list