[..] > - If you are dead-set on using a second thread, then you probably need = > to look at using some form of mutex to allow thread2 to block until = > thread1 signals that data is ready. Repeatedly suspending and resuming = > threads is seldom a good idea and is fraught with problems - simply = > having thread2 block until there is something to do is far more likley = > to be robust. > Under Windows, you can do this in a number of ways, e.g. with a mutex or = > a semaphore - though in this case a simple notification event object = > might be the simplest. > Have a brows around on MSDN, particularly the "Using Synchronization" = > pages, and there are loads of examples in there to show you things to = > try.
Specifically, read up on what are called "condition variables." If you want a thread to block until some specific event occurs, it's exactly what you need. _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

