[Lazarus] Forum registration problem

Diogo Piçarra listas at alphamatrix.org
Mon Sep 20 02:22:43 CEST 2010

On 19 September 2010 11:12, Sven Barth <pascaldragon at googlemail.com> wrote:
>> Well, one pain less. Delphi deprecated suspending/resuming of threads.
> Huh? O.o Did they give a reason for this move?

Quoting from a Linux website (but applies to windows and other platforms too)

"Notice that thr_suspend() is inherently dangerous and prone to race
conditions. For one thing, there is no control on where the target
thread  stops: it can very well be stopped in the middle of a critical
section, while holding mutexes. Also, there is no guarantee on when
the target thread  will actually stop. For these reasons, you'd be
much better off using mutexes and conditions instead. The only
situations that really require the ability to suspend a thread are
debuggers and some kind of garbage collectors."

For a more detailed explanation (see why Java doesn't support it either):


  - Graeme -

fpGUI - a cross-platform Free Pascal GUI toolkit

More information about the Lazarus mailing list