|
From: Lark <lar...@ya...> - 2001-02-21 17:52:31
|
on 2/21/01 12:48 AM, Charles Lechasseur at da...@sy... wrote: >> Aye. Threads are actually pretty simple to add in powerplant IIRC. >> The effort involved is in redesigning the app structure to be >> thread-friendly. Unless we want to put each CScribiaDoc in its own >> thread - is it bad to have UI in different threads? > > i'm not sure. on Classic MacOS, i guess it doesn't matter because as long > as you don't yield, no one else is going to fiddle with the display. that > said, it's usually a bad practice to interact with the GUI directly within > a thread. it's best to have the thread make a request that will be handled > in the main thread. Yes. And in a sense having the scanner update the shared data structures (while holding the lock) can be seen as making such a request. The GUI can then periodically pull the changes in (re-render the output). Threading really only makes sense for the scanner, I think. All other tasks are not computationally expensive enough to benefit from threading. -- Lark <lar...@ya...> |