On Tue, 6 Jul 2021, 21:55 Albrecht Schlosser wrote:
The static variable
is the problem, independent of any
interaction or incompatibility with the other form of Fl::awake().
Since there is only one static variable callling
Fl::thread_message() later in user code can only retrieve the last
value assigned to this variable
. Hence Fl::awake(void*
message) is IMHO always unreliable unless you know that messages are
queued infrequently, i.e. less than can be handled by events. A user
moving the mouse permanently would likely lead to an "event
overflow" dropping messages, whereas Fl::awake(F, message) queues
all messages so no message can ever be lost.
Well, strictly the queue holds the last 1024 messages. Once it is full, older messages will be lost to make room for newer ones... But if the user code is lagging 1000 events behind then there are bigger problems I'd hazard....
I was never really clear why the "old" method wasn't adapted to use the queue, though.
Perhaps it was so that legacy code would still behave in the same manner or something?
From my Fairphone FP3
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/CAGFM6da6eMoFEOofu_AesLc6X1KjYjj3hPP%2BpArdChQa7DV5SA%40mail.gmail.com.
[ Direct Link to Message ]