Re: [fpc-pascal] TThread and WaitFor

2016-05-06 Thread Sven Barth
Am 06.05.2016 11:34 schrieb "LacaK" : > > Hi *, > is this safe: > > FThread.Terminate; // what if here is switched FThread to execution and will immediately end his Execute procedure > FThread.WaitFor; // what happens if FThread is freed before WaitFor is executed > > ? > > assuming, that FThread h

Re: [fpc-pascal] TThread descendant with public events

2010-11-01 Thread Graeme Geldenhuys
Op 2010-11-01 11:06, Sven Barth het geskryf: > > The code is still run in the thread's context, no matter whether the > code is in your TThread class or e.g. a global procedure. So you should > use Synchronize to trigger the event. Thank you very much Sven and Martin. What you said then confir

Re: [fpc-pascal] TThread descendant with public events

2010-11-01 Thread Martin Schreiber
On Monday, 1. November 2010 09.57:21 Graeme Geldenhuys wrote: > Is this safe to do? > No. An onxx event is a tmethod. "Triggering" the event means calling the method -> it runs in context of the calling thread. Martin ___ fpc-pascal maillist - fpc-pa

Re: [fpc-pascal] TThread descendant with public events

2010-11-01 Thread Sven Barth
On 01.11.2010 09:57, Graeme Geldenhuys wrote: Hi, What is the rules regarding a TThread descendants and public events. I created a thread that has OnXXX events. These events are triggered in the Execute method of that event. Now my main event (which manages the application GUI) hooked into thes

Re: [fpc-pascal]TThread

2003-07-23 Thread Michael Van Canneyt
On Wed, 23 Jul 2003, Lukas Gebauer wrote: > because I am new in FPC community, can someone explain me what is bad > on threads implementation on FPC? (TThread object interesting me.) 1. Threads don't work in FPC 1.0.X 2. In FPC 1.1, threads are implemented as a language construct (i.e. threa