[Lazarus] More thread questions.

2010-07-12 Thread Frank Church
Can I take it that a thread will never execute until the Execute procedure
is called, and if the Execute procedure is exited, it will not run again
until called by the main thread?

i.e Resuming a thread which has exited will achieve nothing unless it is
called within the scope of an existing Execute?

-- 
Frank Church

===
http://devblog.brahmancreations.com
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] More thread questions.

2010-07-12 Thread Paul Nicholls
Hi Frank,
  AFAIK, a thread WILL execute immediately exiting the Create method unless you 
pass False to the suspended variable in the create method, and call Resume in 
the main thread later on.

I don't think resuming a thread will never do anything if the threads execute 
method has fallen through, but people can feel free to correct me on this :)

cheers,
Paul


  - Original Message - 
  From: Frank Church 
  To: Lazarus mailing list 
  Sent: Tuesday, July 13, 2010 1:42 AM
  Subject: [Lazarus] More thread questions.



  Can I take it that a thread will never execute until the Execute procedure is 
called, and if the Execute procedure is exited, it will not run again until 
called by the main thread? 

  i.e Resuming a thread which has exited will achieve nothing unless it is 
called within the scope of an existing Execute?

  -- 
  Frank Church

  ===
  http://devblog.brahmancreations.com



--


  --
  ___
  Lazarus mailing list
  Lazarus@lists.lazarus.freepascal.org
  http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus