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 |
|
mirek
Messages: 13975 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
|
|
|
|
Goto Forum:
Current Time: Fri Mar 29 15:03:34 CET 2024
Total time taken to generate the page: 0.01459 seconds
|