I'm asking because I'm exploring the use of Posix timers to implement Fl::add_timeout()
for the Wayland platform (see the timer_create() and timer_settime() functions).
These functions allow to trigger the timer either as a signal or starting a thread. I've chosen the thread option, and have the thread call Fl::awake(cb, data)
so that the timer's callback gets then called by the main thread in its event loop.
This solution works nicely in my tests, but has Fl::awake(cb, data) called by the library
when the app calls Fl::add_timeout(). Thus, a user of both Fl::add_timer()
and Fl::awake(void*) may find herself to intermix both forms of Fl::awake()
without knowing it if that solution is used to implement Wayland timers.
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.