[Lazarus] Synchronize troubles (attach forgotten, sorry)

Micha Nelissen micha at neli.hopto.org
Thu Feb 21 21:42:24 CET 2008


JoshyFun wrote:
> Hello lazarus-list,
> 
> I'm working in a program that needs multiple threads and one will
> synchronize with main thread to display a log. I do not wish to
> continue the caller thread meanwhile the Synchronize has not been

Synchronize is blocking by itself already.

> multithread example code keeping only the things that I need, and to
> ask to you if this is a Synchronize bug/problem or a non-wanted

You've just illustrated a perfect example of a deadlock ;-).

Synchronize blocks until SetString completes, but that doesn't complete
until m_EventDone is set, but that only happens when Synchronize
completes, which it never does.

Micha



More information about the Lazarus mailing list