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 » how to use timer id? and how to kill a timer
Re: how to use timer id? [message #27540 is a reply to message #27536] Thu, 22 July 2010 12:10 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
You are never going to be able to guarantee that the timer won't execute between receiving the last packet and destroying the timer.

Even if you execute it in the main thread you have to await on the GUI Mutex and the timer could execute while you're doing that. You need to modify your design so that this is not a problem.

Do that and the example above should work fine. You don't need the timer creation and destruction to be in the main thread (and they are mutex locked and threadsafe).
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Time callbacks when ticks overlap
Next Topic: Callbacks with 'Disable' feature
Goto Forum:
  


Current Time: Wed Aug 27 14:27:24 CEST 2025

Total time taken to generate the page: 0.07542 seconds