As what Ian also mentioned, FLTK by design assumes that a single thread is 
accessing the GUI at a time. For instance there is a single graphics state (like
current transformation matrix, current font, color) and other globals - 
accessing/changing them (eg during redraw) in parallel would cause a mess. You 
could get
away by having some global "GUI lock" (which FLTK already has) but then you 
loose all the multi-threading advantage.

You can run as many threads as you wish (eg each window can have additional 
background thread) for calculation-intensive tasks which do not access GUI 
directly
and once done, send the results to the particular window/main-thread (with 
proper synchronisation/locking) to visualise the results.


R.


PS: This question would fit better in fltk.general forum




_______________________________________________
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to