[fpc-pascal] Re: Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

Andrew Brunner andrew.t.brunner at gmail.com
Fri Oct 15 18:26:59 CEST 2010


On Fri, Oct 15, 2010 at 11:03 AM,  <JeLlyFish.software at gmx.net> wrote:
> On Fri, 15 Oct 2010 17:24:03 +0200, Sven Barth
> <pascaldragon at googlemail.com> wrote:
>
>> The problem isn't the pthreads library. The problem is the POSIX threading
>> specification of which pthreads is an implementation (look at the comment in
>> CSuspendThread again).
>
> Actually, it's not even a problem. Externally suspending a thread is
> inherently unsafe and should not be done at all.
>
> If you'd do *that* would be the problem (yes, I know that there are
> possible use cases, but these are negligible).
>

Externally suspending a thread *IS* absolutely unsafe.  But the notion
of suspending an ENGINE at runtime externally is totally expected.
The thread itself MUST put itself in a suspended state.

+1



More information about the fpc-pascal mailing list