-
Notifications
You must be signed in to change notification settings - Fork 51
Enable TimerLoop to be dropped #1079
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
Enable TimerLoop to be dropped #1079
Conversation
e1a2a5c to
dc0d761
Compare
dc0d761 to
38a9734
Compare
38a9734 to
43b6f36
Compare
|
@foriequal0 Please, resolve the conflicts. |
|
|
||
| fn clear_and_stop(&mut self) { | ||
| self.finished = true; | ||
| self.states.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you explain why do we need to clear the states?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.states is for indexing items in self.heap. It is natural to drain/clear them in pair.
Clone can accidentially lead to someone sharing strong ref to scheduler
1500917 to
7e0b066
Compare
7e0b066 to
99f22ae
Compare
No description provided.