Skip to content

Conversation

@mitsuhiko
Copy link
Contributor

This switches to the fragile library to handle non send processors and solves potentially UB.

This increases safety as before we did not have a sane way to handle
thread reuse and also RwLock was just not the right way to protect
this.
@mitsuhiko mitsuhiko requested a review from jan-auer June 21, 2018 20:33
#[cfg(feature = "with_client_implementation")]
unsafe impl Send for PendingProcessors {}
pub enum PendingProcessor {
Send(Box<FnOnce() -> Box<Fn(&mut Event) + Send + Sync> + Send + Sync>),
Copy link
Member

Choose a reason for hiding this comment

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

Might be nice to have From for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ugh. I actually should remove the pub from here I think. This should be internal only now.

@mitsuhiko mitsuhiko merged commit e77dca3 into master Jun 22, 2018
@jan-auer jan-auer deleted the feature/fragile branch May 17, 2019 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants