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

[fpc-pascal] TThread and WaitFor

2016-05-06 Thread 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 has FreeOnTerminate := True; (looking into source co