[Lazarus] Methods and stacks

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Jul 23 15:22:54 CEST 2010


On Fri, 23 Jul 2010 10:51:05 +0000
Mark Morgan Lloyd <markMLl.lazarus at telemetry.co.uk> wrote:

> Can somebody please confirm that there's no mechanism by which a method 
> can switch to a private stack.
> 
> I've hacked together a very simple round-robin scheduler that I'm using 
> to service serial lines- nothing critical, just simulating LEDs on 
> traffic and summarising packet types. If a method could have a private 
> stack, or there was some variant of QueueAsyncCall() which switched to a 
> private stack, it would be possible to have a Yield procedure or to 
> implement coroutine-type transfers.

AFAIK there is nothing provided by FPC.

 
> Frankly I think I'm at the limit of what can be done without threads, 
> which I've used plenty of times before but I thought I'd explore 
> alternatives.

There are several units helping with thread pools.

http://wiki.lazarus.freepascal.org/Manager_Worker_Threads_System
http://wiki.lazarus.freepascal.org/Parallel_procedures

Mattias




More information about the Lazarus mailing list