Skip to content
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

Add a name to unpacking thread #38

Merged
merged 1 commit into from
Aug 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,13 @@ impl<T> Bus<T> {
// so we don't have to wait for unpark() to return in broadcast_inner
// sending on a channel without contention is cheap, unparking is not
let (unpark_tx, unpark_rx) = mpsc::unbounded::<thread::Thread>();
thread::spawn(move || {
for t in unpark_rx.iter() {
t.unpark();
}
});
let _ = thread::Builder::new()
.name("bus_unparking".to_owned())
.spawn(move || {
for t in unpark_rx.iter() {
t.unpark();
}
});

Bus {
state: inner,
Expand Down
Loading