1. New Thread Manager 02b (on the way)
- Posted by Al Getz <Xaxo at aol.com> Aug 22, 2005
- 425 views
Hello again, The new ThreadManager02 is on the way to the archives :) This new version has more functions that allow more advanced handling of threads within an application: PauseThread(atom RID) ResumeThread(atom RID) QueryWaitThread(atom RID) ForceNextRunningThread(atom RID) --similar to Preemptive MT QueryThreadActive(atom RID) QueryAnyThreadActive() For example, PauseThread will pause a thread and QueryWaitThread allows one thread to wait for others to complete before proceeding. (such as to display a message box that the app isnt done saving a file). QueryThreadActive or QueryAnyThreadActive can be called to see if one or more threads have completed before an app is allowed to close. Also, calls to Euphoria's message_box() wont hang the threads so there is no problem using that to display user feedback about what's happening in another thread (very useful). In fact, even the thread that calls message_box wont pause unless PauseThread is called, which allows even that thread to continue running while it displays a message box if need be. More demos included for WinClass, but routines can be copy/pasted into the WinLib demo to make that work the same. Have fun with it :) Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's"