I might be out of sync here, but isn't the GUI's sole problem, knowing whether any background tasks are running? So why can't it increment (on the main thread) the number of pending tasks when it creates one, then have the event handler for TaskDone or whatever it is decrement that number (this will also happen only on the main thread)? If the count of pending tasks is not 0, the app should refuse to exit. Only the main thread will ever access this variable, and the thread will never have to block. It should not wait on *anything.* I don't see the concurrency issues here. I do this all the time, in fact.
=================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
