Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Callbacks and Timers » PostCallback executes 2 at once?
Re: PostCallback executes 2 at once? [message #25593 is a reply to message #25515] Tue, 02 March 2010 19:09 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
kohait00 wrote on Fri, 26 February 2010 11:47

Hi Mirek,

i got to kind of a misbehaviour in my software, where i think that PostCallback is not executing in FIFO order..or at least it executes 2 in parallell. is this true?

in a 2 year old post from you
http://www.ultimatepp.org/forum/index.php?t=msg&goto=105 45&
i found

Quote:


Async / Non-blocking. It gets performed when GUI thread goes idle after processing messages (if any).

Callback queue itself is MT protected.

Also, callback gets invoked by GUI thread - it is in fact the best way how worker thread is supposed to communicate with it, means you do not need to worry too much about protecting data, there can only be a single GUI thread, means now two Callbacks from Callback (timer) queue can be processed at the same time.



is this true? could you clarify this? can it happen that a second Callback (which was also posted by PostCallback) gets executed while the first one is still in execution?


No, that is impossible.

(I think there is a typo in above text, should be 'no' instead of 'now'...)

Mirek
 
Read Message
Read Message
Read Message
Previous Topic: extracted Timer from Ctrl
Next Topic: Strange crash connected to Timer
Goto Forum:
  


Current Time: Tue Aug 26 21:57:49 CEST 2025

Total time taken to generate the page: 0.12573 seconds