Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix problem with re-adding timer in callback #20

Closed
wants to merge 1 commit into from

Conversation

tidklaas
Copy link
Contributor

@tidklaas tidklaas commented May 25, 2016

When processing timer callbacks, atomTimerCallbacks() removes due
timers from the timer_queue and puts them in a callback list.
If a callback calls atomTimerRegister() for itself, the timer gets
prepended to the timer_queue. On return, the callback processing
will continue in the timer_queue instead of the callback list.
Fixed by saving a pointer to the next entry in the callback list
before calling the cb_func.

Fixes #17

When processing timer callbacks, atomTimerCallbacks() removes due
timers from the timer_queue and puts them in a callback list.
If a callback calls atomTimerRegister() for itself, the timer gets
prepended to the timer_queue. On return, the callback processing
will continue in the timer_queue instead of the callback list.
Fixed by saving a pointer to the next entry in the callback list
before calling the cb_func.
@tidklaas
Copy link
Contributor Author

Oops, @simonccn already submitted a fix for this.

@tidklaas tidklaas closed this May 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant