[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 17:24:03 CEST 2010
Am 15.10.2010 17:11, schrieb Andrew Brunner:
> On Fri, Oct 15, 2010 at 9:55 AM, Sven Barth<pascaldragon at googlemail.com> wrote:
>> 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
>
> Now that is funny. I guess I made the assumption that the call the
> Pthreads Suspend thread would actually do what is advertised, at lease
> on good faith...
>
> Who else has the source to PThreads? Anyone care to read it over? I have it.
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).
Regards,
Sven
More information about the fpc-pascal
mailing list