This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

event order guarantee?

 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
To continue a topic someone else pondered a couple of days ago...
Is there any guarantee that events will be received by the GUI (event handlers) in the order that they were generated?
Thank You,
-Dirk Schreckmann
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, there is. Otherwise how could you type a series of characters and expect that the keys will be read in the correct order? It would be impossible to write any sort of text editor, for example. Instead, it is guaranteed that a single listener will always observe multiple events in the order they were generated. What is not guaranteed is the order in which multiple listeners will be notified of a single event. So if there are three events with multiple listeners - first all listeners will be notified of event 1 (in unknown order), then all listeners will be notified of event 2 (again in unknown and possibly different order), and then all listeners will be notified of event 3 (etc).
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jim, that's exactly what I wanted to know.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic