[Lazarus] A few questions on threads
vfclists at gmail.com
Tue Oct 4 11:37:58 CEST 2011
What is the purpose of the while not Terminated in a threads execute loop?
If a thread is doing its own thing and knows when or not it has finished
what is the purpose of the while not Terminated
Is Terminated designed to be called by other procedures besides the thread
itself? Can a thread be Terminated externally?
This also seems to imply that if the code within the while not Terminated
loop is a long running sequence a Termniate command will not be processed
until control returns to the beginning of the loop
Can a thread respond to a new Execute command while it already Executing? Do
threads have ways of being interrogated about their state while Executing?
Suspend and Resume have been deprecated, and I want to know how a thread can
If a thread is not set to FreeOnTerminate, can a thread suspend itself by
using Terminate or some other custom function, doing some clean ups and
waiting so it can be restarted by the Start procedure, by adding some custom
fields to make it itself aware that it is an a paused state, so that when an
Execute is sent it look up those fields, set Terminated to false and
continue as though nothing has happened?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus