-
Notifications
You must be signed in to change notification settings - Fork 242
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
Switch to crossbeam-queue for events #1091
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.
Did we run into this causing problems? Signal safety is really annoying.
Use a lock-free queue to store the event list because the event callbacks might be called from inside a signal handler. Most system calls are not safe in that context, so we just spin if the queue is full.
64faf2f
to
d83f983
Compare
What's left to do here?
@ahomescu, did you already do this / do you still plan to? |
I added a bunch of comments on signal safety, and removed a few potentially unsafe |
a7fe739
to
ca953b3
Compare
0f1e3c9
to
4dc2f2a
Compare
Use a lock-free queue to store the event list because the event callbacks might be called from inside a signal handler. Most system calls are not safe in that context, so we just spin if the queue is full.