-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Expose around worker in Runtime builder #1557
Conversation
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.
core_threads seems mispelled as core_threds.
.unwrap() | ||
.take() | ||
.unwrap() | ||
timers[index].lock().unwrap().take().unwrap() |
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.
Was this a rustfmt change?
@@ -58,6 +58,8 @@ pub struct Builder { | |||
|
|||
/// The clock to use | |||
clock: Clock, | |||
|
|||
around_worker: Option<Arc<dyn Fn(&threadpool::Worker) + Send + Sync + 'static>>, |
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.
Nit: every other field has a doc comment, and this is one of the less self-explanatory fields IMO
Co-Authored-By: Eliza Weisman <eliza@buoyant.io>
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.
One change request inline. Cheers 👍
where | ||
F: Fn(&threadpool::Worker) + Send + Sync + 'static, | ||
{ | ||
self.threadpool_builder.around_worker(f); |
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.
This should set self.around_worker
.
We probably should add a test too. |
I'm going to close this PR as I believe #1657 takes over, but thanks for doing the work 👍 |
No description provided.