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

Jonas Maebe jonas.maebe at elis.ugent.be
Fri Oct 15 22:50:29 CEST 2010


On 15 Oct 2010, at 22:31, Vinzent Höfler wrote:

> - Suspend/Resume should be gone (you can't guarantee it to work,
>  so there's no point in doing it at all)

FWIW, they're deprecated since Delphi 2009, so they will disappear over time. To resume a tthread created with fcreatesuspended=true, they introduced a new "Start" method (which does basically the same as Resume, but it's not deprecated).

> - FreeOnTerminate should be gone, (meaning no way to actively call
>  TThread.Destroy from another thread, a thread gets destroyed
>  automatically when it leaves its execute method)
>  (IIRC FreeOnTerminate was even set to False by the default
>   constructor, so you had the choice of either using the default
>   or introducing a race condition by setting it after the
>   "inherited Create" - which starts the execute.)

This problem has been solved with http://bugs.freepascal.org/view.php?id=16884


Jonas


More information about the fpc-pascal mailing list