| [ Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]
STR #1532
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 2 - Low, e.g. a documentation error or undocumented side-effect |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Documentation |
Summary: | Multithreading documentation needed |
Version: | 1.1-current |
Created By: | wavexx |
Assigned To: | matt |
Fix Version: | 1.1-current (SVN: v5621) |
Update Notification: | |
Trouble Report Files:
|
#1 | wavexx 11:29 Dec 11, 2006 |
| test.cc 1k | |
Trouble Report Comments:
|
#1 | wavexx 11:29 Dec 11, 2006 |
| Attached program fails 70% of the times on OSX (somewhere inside the do_queued_events stack). Can someone confirm this? | |
|
#2 | mike 11:52 Dec 11, 2006 |
| You can't show or hide windows from a thread - only the main thread can do that... | |
|
#3 | wavexx 12:21 Dec 11, 2006 |
| Argh... I missed that. Is this documented somewhere? Does this include subwindows (I guess so)? | |
|
#4 | mike 13:28 Dec 11, 2006 |
| I'm not sure how much documentation we have for the threading support, but essentially anything that hits the display/window system is not allowed outside of the main thread for all versions of WIN32 and OSX and most versions of X11... | |
|
#5 | wavexx 07:34 Dec 12, 2006 |
| We definitively need documentation about threading. I'm unsure whether an entry in each function/method listing the threading status would be better than a list of thread-unsafe functions as an "Appendix C" along with the general rules. Certainly the latter would be easier to do, since 1.1-x is feature-locked anyway.
There are things which may be non obvious:
- Timers are not safe. - Is changing the label of a top-level window thread safe? Probably not. - Calling size(), border() etc isn't either. - What about GL subwindows? - fl_ask/choice/choose aren't either, along with helper functions that handle their own run() loop. | |
|
#6 | matt 14:48 Jan 18, 2007 |
| Added Chapter 10 | |
[ Return to Bugs & Features ]
|
| |