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

Sven Barth pascaldragon at googlemail.com
Fri Oct 15 16:55:35 CEST 2010


Am 15.10.2010 16:31, schrieb Andrew Brunner:
> On Fri, Oct 15, 2010 at 9:24 AM, Jonas Maebe<jonas.maebe at elis.ugent.be>  wrote:
>> You replaced a bunch of semaphore create/lock/unlock/destroy operations with
>> calls to a function that does not do anything.
>
> I did not.  I REMOVED create/destroy/lock/unlock.  I ADDED calls to
> the ThreadManager's own functions for thread Resume and Suspend.  Did
> you try executing the suspend command?  What happened?

What do you believe happens with a thread when you execute a function 
that only returns "dword(-1)" and does nothing else? :)

Take a look at Jonas code excerpt from "rtl/unix/cthreads.pp" again and 
you'll see that the call to "pthread_kill" in CSuspendThread is disabled 
and has a big comment before it.

Regards,
Sven



More information about the fpc-pascal mailing list