Skip to content

mg_mgr_poll no longer accounts for timers #2850

Discussion options

You must be logged in to vote

https://mongoose.ws/documentation/#mg_timer_add

NOTE: Make sure that the timer interval is equal or more to the mg_mgr_poll() timeout

https://mongoose.ws/documentation/tutorials/core/timers/

It is important to keep the event manager polling timeout smaller than the timer interval, because timers are checked at every polling cycle. If there are no network events, the poll function would sleep for the whole polling interval and if it is larger than the timer timeout, a timer invocation could be missed.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by scaprile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants