Skip to content

Conversation

@foriequal0
Copy link
Contributor

@foriequal0 foriequal0 commented Jan 10, 2019

No description provided.

@foriequal0 foriequal0 added the do-not-merge Do not merge (for mergify.io) label Jan 10, 2019
@foriequal0 foriequal0 requested a review from sgkim126 January 10, 2019 06:34
@foriequal0 foriequal0 force-pushed the feature/drop-timer-loop branch 2 times, most recently from e1a2a5c to dc0d761 Compare January 15, 2019 08:42
@foriequal0 foriequal0 removed the do-not-merge Do not merge (for mergify.io) label Jan 15, 2019
@sgkim126
Copy link
Contributor

@foriequal0 Please, resolve the conflicts.


fn clear_and_stop(&mut self) {
self.finished = true;
self.states.clear();
Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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.

@sgkim126
Copy link
Contributor

@foriequal0

Clone can accidentially lead to someone sharing strong ref to scheduler
@foriequal0 foriequal0 force-pushed the feature/drop-timer-loop branch 3 times, most recently from 1500917 to 7e0b066 Compare April 30, 2019 07:51
@foriequal0 foriequal0 force-pushed the feature/drop-timer-loop branch from 7e0b066 to 99f22ae Compare April 30, 2019 10:08
@mergify mergify bot merged commit a1aa789 into CodeChain-io:master May 7, 2019
@foriequal0 foriequal0 deleted the feature/drop-timer-loop branch September 11, 2019 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants