Re: [fpc-pascal] TThread.Suspend

2014-01-30 Thread Michael Van Canneyt
On Thu, 30 Jan 2014, Mark Morgan Lloyd wrote: Marco van de Voort wrote: In our previous episode, Mark Morgan Lloyd said: Both yes, because anything but that was never fully supported with Resume in the first place. Second question: now that Suspend is deprecated, what should a thread do i

Re: [fpc-pascal] TThread.Suspend

2014-01-30 Thread Mark Morgan Lloyd
Marco van de Voort wrote: In our previous episode, Mark Morgan Lloyd said: Both yes, because anything but that was never fully supported with Resume in the first place. Second question: now that Suspend is deprecated, what should a thread do if it wants to stop processing pending a subsequent

Re: [fpc-pascal] TThread.Suspend

2014-01-30 Thread Marco van de Voort
In our previous episode, Mark Morgan Lloyd said: > > Both yes, because anything but that was never fully supported with Resume in > > the first place. > > > >> Second question: now that Suspend is deprecated, what should a thread do > >> if it wants to stop processing pending a subsequent resume?

Re: [fpc-pascal] TThread.Suspend

2014-01-30 Thread Michael Schnell
On 01/30/2014 01:24 PM, Mark Morgan Lloyd wrote: OK, noted. But as a stylistic point it seems to me that this very basic functionality has been ripped out of the RTL (Classes.TThread) and moved into the FCL (Syncobjs.TEvent) leaving no adequate substitute. IMHO "Suspend" never was a good ide

Re: [fpc-pascal] TThread.Suspend

2014-01-30 Thread Mark Morgan Lloyd
Marco van de Voort wrote: In our previous episode, Mark Morgan Lloyd said: First question: is Start an accurate replacement for Resume, Yes. or can it only be used to start a thread created in the suspended state? Yes. Both yes, because anything but that was never fully supported with Res

Re: [fpc-pascal] TThread.Suspend

2014-01-30 Thread Michael Van Canneyt
On Thu, 30 Jan 2014, Mark Morgan Lloyd wrote: First question: is Start an accurate replacement for Resume, or can it only be used to start a thread created in the suspended state? Second question: now that Suspend is deprecated, what should a thread do if it wants to stop processing pending

Re: [fpc-pascal] TThread.Suspend

2014-01-30 Thread Marco van de Voort
In our previous episode, Mark Morgan Lloyd said: > First question: is Start an accurate replacement for Resume, Yes. > or can it > only be used to start a thread created in the suspended state? Yes. Both yes, because anything but that was never fully supported with Resume in the first place.

[fpc-pascal] TThread.Suspend

2014-01-30 Thread Mark Morgan Lloyd
First question: is Start an accurate replacement for Resume, or can it only be used to start a thread created in the suspended state? Second question: now that Suspend is deprecated, what should a thread do if it wants to stop processing pending a subsequent resume? Please note that I'm asking

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

[fpc-pascal] TThread.Suspend under Linux

2007-06-02 Thread Graeme Geldenhuys
Hi, 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. -- (gdb) run Starting program: /home/graemeg/programming/