|
|
So if you can create and show all the window objects in your main thread, then arrange for Fl::wait() to be called periodically from the main thread, that ought to just about do the job.
Yes I did that when I wrote an animated "wait window widget" based on a threading solution. A lot of bad things happened unexpectedly until I finally got a handle on how to deal with ensuring FLTK updates happen only in the main thread.
In retrospect, all my initial problems were due to not respecting the FLTK documentned warning to use their lock mechanism for multi-threaded solutions. I definitely respect that now, even though I wound up probably sort of duplicating what it does in my own way (i.e., my own version of Fl::run() and Fl::awake() only implemented with Bohm-atomic "mutexes"). I would utilize the FLTK locking mechanism if I had to do it all over again.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/72bdabab-b603-4260-a8fe-f17f1b4f2dc9n%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |