Child threads and the UI
Child threads and the UI
- Subject: Child threads and the UI
- From: Chris Gehlker <email@hidden>
- Date: Mon, 22 Oct 2001 13:09:50 -0700
I'm working on a program that does cel animation. Building a Movie can take
awhile and I want to show a progress bar while the program is looping
through frames. Looking through the archives of this list, I found that the
canonical approach is to launch a thread to do the animation and to use DO
to report progress back to the main thread which runs the progress bar. The
canonical way works.
But it also seems to work if I just let the daughter thread own the
NSProgressIndicator and the NSPanel that it's displayed in. This also seems
like cleaner code because none of the methods in the main thread need to
know anything about the progress bar.
I'm just worried that I may be setting myself up for a fall by going down
this path. Am I missing something?
--
Cogito Ergo Spud. - I think therefore I yam.