Re: [fltk.coredev] About mixing Fl::awake(Fl_Awake_Handler, void*) and Fl::awake(void*)

GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: About mixing Fl::awake(Fl_Awake_Handler, void*) and Fl::awake(void*) imm 14:08 Jul 06 top right image
 
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?
--
Ian
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 fltkcoredev+unsubscribe@googlegroups.com.
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 ]
 
bottom left image   bottom right image
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2021 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.