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

Use an RwLock for AUXILIARY_EVENT_TX #668

Merged
merged 2 commits into from
Jan 23, 2025
Merged

Use an RwLock for AUXILIARY_EVENT_TX #668

merged 2 commits into from
Jan 23, 2025

Conversation

DavisVaughan
Copy link
Contributor

@DavisVaughan DavisVaughan commented Jan 10, 2025

Part of #661

We expect it to be write locked very rarely, so it should still be pretty cheap to get access to this safely

As we saw in tracing-subscriber, this is the same kind of mechanism that the layer "handle" uses internally, so hopefully the overhead is quite low.

We expect it to be write locked very rarely, so it should still be pretty cheap to get access to this safely
@DavisVaughan DavisVaughan requested a review from lionel- January 10, 2025 21:46
*tx = Some(auxiliary_event_tx);
},
Err(error) => {
log::error!("Failed to set auxiliary event channel. {error}");
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd unwrap that since it means the auxiliary loop thread panicked, i.e. something very wrong happened?

@DavisVaughan DavisVaughan merged commit 794cb85 into main Jan 23, 2025
5 of 6 checks passed
@DavisVaughan DavisVaughan deleted the feature/aux-rwlock branch January 23, 2025 20:10
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants