-
-
Notifications
You must be signed in to change notification settings - Fork 392
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
Should register_timer be lock protected? #953
Comments
I was working on the assumption that these would be called at the initial setup. |
"these would be called at the initial setup" I didn't check yet my application when I register the timers, I will back to this later.. but would be helpful to add this concern to the documentation. |
I was evaluating a bit more this, This way, I'm seeing that on a relative medium complexity application, the limit of about 254 timers could easily be reached. Use case: I may only need on a specific sporadic state to use a timer and then don't need any more. (so why keep the handler?) Does it sounds to be an improvement for etl::timers or should I wrap and implement something on top of etl::timers? |
with current etl::timer, I may externally and initially register all the expected timers the task will use and pass it "here is your array of timer IDs", but later I would need also to expose the timer class controller (which I can't protect the task to make the mistake to register/unregister more timers) |
I understand the need for lock/unlock of active_list.
I understand the not need for protection on timer_array generally, except on:
register_timer, unregister_timer and also on clear() functions.
These functions could be accesses by multiple tasks which can lead to corruption of timer_array.
Or did I miss interpreted something?
The text was updated successfully, but these errors were encountered: