summaryrefslogtreecommitdiff
path: root/src/Fl_lock.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-01-09 15:07:46 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-01-09 15:07:59 +0100
commita6dd0adac7078ea93955242ab4bad49c812c20a8 (patch)
tree2e6c3132d9ea7993aa62d26b91385d9886de6de3 /src/Fl_lock.cxx
parent13ce93330a5e5e516e179b5580286e6de43afa5b (diff)
Doc only: fix for "Fl::awake() and Fl::add_timeout()" (#524)
Diffstat (limited to 'src/Fl_lock.cxx')
-rw-r--r--src/Fl_lock.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Fl_lock.cxx b/src/Fl_lock.cxx
index fdf045be9..d7bdf9c34 100644
--- a/src/Fl_lock.cxx
+++ b/src/Fl_lock.cxx
@@ -179,8 +179,14 @@ int Fl::awake(Fl_Awake_Handler func, void *data) {
argument will trigger event loop handling in the main thread. Since
it is not possible to call Fl::flush() from a subsidiary thread,
Fl::awake() is the best (and only, really) substitute.
-
- See also: \ref advanced_multithreading
+
+ It's \e not necessary to wrap calls to any form of Fl::awake() by Fl::lock() and Fl::unlock().
+ Nevertheless, the early, single call to Fl::lock() used to initialize threading support is necessary.
+
+ Function Fl::awake() in all its forms is typically called by worker threads, but it can be used safely
+ by the main thread too, as a means to break the event loop.
+
+ \see \ref advanced_multithreading
*/
void Fl::awake(void *v) {