Re: [fpc-pascal] TThread.Suspend under Linux

2007-06-02 Thread Michael Van Canneyt
On Sat, 2 Jun 2007, Graeme Geldenhuys wrote: > On 6/2/07, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: > > > Just to clarify: don't use .Suspend on another thread. Suspending yourself > > > and > > > letting someone else wake you up again is no problem. > > > > Except that it doesn't work on L

Re: [fpc-pascal] TThread.Suspend under Linux

2007-06-02 Thread Graeme Geldenhuys
On 6/2/07, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: > Just to clarify: don't use .Suspend on another thread. Suspending yourself and > letting someone else wake you up again is no problem. Except that it doesn't work on Linux. Nope, that works fine here! My worker thread counts down fro

Re: [fpc-pascal] TThread.Suspend under Linux

2007-06-02 Thread Jonas Maebe
On 02 Jun 2007, at 15:11, Michael Van Canneyt wrote: On Sat, 2 Jun 2007, Jonas Maebe wrote: Just to clarify: don't use .Suspend on another thread. Suspending yourself and letting someone else wake you up again is no problem. Except that it doesn't work on Linux. It should, that uses pla

Re: [fpc-pascal] TThread.Suspend under Linux

2007-06-02 Thread Michael Van Canneyt
On Sat, 2 Jun 2007, Jonas Maebe wrote: > > On 02 Jun 2007, at 13:58, Graeme Geldenhuys wrote: > > >Okay that makes sense. I guess my Thread Manager did actually teach > >me something then. :-) Don't use .Suspend > > Just to clarify: don't use .Suspend on another thread. Suspending yourself

Re: [fpc-pascal] TThread.Suspend under Linux

2007-06-02 Thread Jonas Maebe
On 02 Jun 2007, at 13:58, Graeme Geldenhuys wrote: Okay that makes sense. I guess my Thread Manager did actually teach me something then. :-) Don't use .Suspend Just to clarify: don't use .Suspend on another thread. Suspending yourself and letting someone else wake you up again is no pro

Re: [fpc-pascal] TThread.Suspend under Linux

2007-06-02 Thread Graeme Geldenhuys
On 6/2/07, Jonas Maebe <[EMAIL PROTECTED]> wrote: > The GUI in frozen after that. Unresponsive, doesn't repaint, etc... I > have to kill it with 'xkill' and click on the form. No, you can also type "fg" to let the process continue. Ah, that worked yes... > But as soon as I > Suspend a threa

Re: [fpc-pascal] TThread.Suspend under Linux

2007-06-02 Thread Jonas Maebe
On 02 Jun 2007, at 12:35, Jonas Maebe wrote: Of course, since Windows provides such functionality, people nevertheless depend on this. But when creating cross-platform code, it's clearly a very bad idea (and several of the caveats mentioned above can of course also hold true under Windows)

Re: [fpc-pascal] TThread.Suspend under Linux

2007-06-02 Thread Jonas Maebe
On 02 Jun 2007, at 10:10, Graeme Geldenhuys wrote: The GUI in frozen after that. Unresponsive, doesn't repaint, etc... I have to kill it with 'xkill' and click on the form. No, you can also type "fg" to let the process continue. But as soon as I Suspend a thread, it returns me to the promp

Re: [fpc-pascal] TThread.Suspend under Linux

2007-06-02 Thread Graeme Geldenhuys
The GUI in frozen after that. Unresponsive, doesn't repaint, etc... I have to kill it with 'xkill' and click on the form. If I run the app it from the console (not via gdb) as such... $> ./MultiTheadDemo It doesn't return to the prompt while the app is running, which is correct. I didn't speci

Re: [fpc-pascal] TThread.Suspend under Linux

2007-06-02 Thread Micha Nelissen
Graeme Geldenhuys wrote: > I got most of my Thread Manager demo written. While trying out a few > features I noticed that every time as Suspend a thread, my app is > killed. Running it through gdb I get the following output. I don't see it being killed from your output, or am I missing something