[fpc-pascal] Where is IsMultiThreaded set under Linux?
Graeme Geldenhuys
graemeg.lists at gmail.com
Fri Oct 8 14:52:50 CEST 2010
On 8 October 2010 14:40, Sven Barth <pascaldragon at googlemail.com> wrote:
>
> 1. If you do a WaitFor the calling thread will be suspended until the thread
> you called WaitFor on terminates (or the timeout elapses, but our WaitFor
> doesn't have a timeout parameter...). Thus it is normal that your main loop
> appears to hang.
I thought about the timeout, and dived into the WaitFor code. So I
changed my code from.
FThread.WaitFor;
..to...
WaitForThreadTerminate(FThread.Handle, 2000);
I waited for 10 seconds and still nothing. The whole app was frozen.
So it seems the timeout logic in TThread (under unix) is broken too.
:-(
> 2. Does your thread really terminate till then? Did you test a thread that
> does nothing and terminates immediatly?
It freezes immediately at the point where I call Syncronize() in the
thread's Execute method. With both options shown above.
If I remove the Syncronize(), then the thread keeps running the loop
inside Execute. Trying to use WaitForThreadTerminate() with the
timeout value > 0, it never happens. So the timeout logic clearly
seems broken.
> I can't help you much with X11, cause I've not yet found the time and the
> need to dig into it.
No problems... just thought I would ask in case you knew.
--
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net:8080/fpgui/
More information about the fpc-pascal
mailing list