-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
src: refactor TimerWrap class #34252
Conversation
There’s no point in having an opaque user data pointer when we’re already using `std::function`.
Split `Stop(true)` and `Stop(false)` into separate methods since the actions performed by these are fully distinct.
d913186
to
76c6697
Compare
@jasnell So it turned out there is a reason why the cleanup hook is on the |
CI: https://ci.nodejs.org/job/node-test-pull-request/32265/ (:green_heart:) |
There’s no point in having an opaque user data pointer when we’re already using `std::function`. PR-URL: #34252 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]> Reviewed-By: David Carlier <[email protected]>
Split `Stop(true)` and `Stop(false)` into separate methods since the actions performed by these are fully distinct. PR-URL: #34252 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]> Reviewed-By: David Carlier <[email protected]>
Landed in 18667ac...874460a |
This does not land cleanly on v14.x, should this be backported? |
There’s no point in having an opaque user data pointer when we’re already using `std::function`. PR-URL: #34252 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]> Reviewed-By: David Carlier <[email protected]>
Split `Stop(true)` and `Stop(false)` into separate methods since the actions performed by these are fully distinct. PR-URL: #34252 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]> Reviewed-By: David Carlier <[email protected]>
There’s no point in having an opaque user data pointer when we’re already using `std::function`. PR-URL: #34252 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]> Reviewed-By: David Carlier <[email protected]>
Split `Stop(true)` and `Stop(false)` into separate methods since the actions performed by these are fully distinct. PR-URL: #34252 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]> Reviewed-By: David Carlier <[email protected]>
src: remove user_data from TimerWrap
There’s no point in having an opaque user data pointer when we’re
already using
std::function
.src: refactor TimerWrap lifetime management
Move the cleanup hook into thesplitTimerWrap
, because it shouldalways be present when that class is being used, and
Stop(true)
andStop(false)
into separate methods since theactions performed by these are fully distinct.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes