PostThreadMessage in place of Terminate
From: Valentin Tihomirov (valentin_at_abelectron.com)
Date: 11/16/03
- Next message: Bojidar Markov: "Re: testing, testing..."
- Previous message: Tor Tveitane: "Re: Resourcestring and array"
- In reply to: Martin James: "Re: need help with long processing app that will allow user to cancel process."
- Next in thread: Martin Harvey (Demon Account): "Re: need help with long processing app that will allow user to cancel process."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 16 Nov 2003 14:41:08 +0200
And of course, use a message loop in your thread to be it more responsive.
PostThreadMessage (WM_QUIT) may terminate thread immediately. Threre is
alternative (events) as well. But in any case, yun need to ensure thread has
completed its task.
PostThreadMessage(threadid, WM_QUIT);
Thread.WaifFor;
Thread.Free;
- Next message: Bojidar Markov: "Re: testing, testing..."
- Previous message: Tor Tveitane: "Re: Resourcestring and array"
- In reply to: Martin James: "Re: need help with long processing app that will allow user to cancel process."
- Next in thread: Martin Harvey (Demon Account): "Re: need help with long processing app that will allow user to cancel process."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|