delphi - In which thread is TIdThreadComponent OnTerminate and OnStopped executed? -
really simple important question concerning tidthreadcomponent:
in thread onterminate , onstopped executed - main thread or worker thread?
can safely assume in main thread when in these events (and call vcl properties , methods)?
update: figured might use debugger , after trying that, looks onstopped within worker thread , onterminate inside main thread. additional benefit debugger can determining other related functions starting/stopping/controlling thread executed , reduce possible bugs.
your observation correct. onstopped triggered in context of worker thread. onterminated triggered in context of main thread.
Comments
Post a Comment