-
Notifications
You must be signed in to change notification settings - Fork 96
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
It would be nice if unbind() from another thread could interrupt run() #85
Comments
is this so you can bind/unbind multiple times in the same process or just to allow for the application to release its resources properly on exit? |
@DOWRIGHTTV it's to support pushing |
I just ran into this problem! I would love if there was a fix for it. As a work around, I made the thread the Just curious, have you tried closing the socket in your close(fd) Thanks for this great library! |
Unfortunately close() doesn't interrupt a read() on the same fd in another thread. I did some research and found python-trio/trio#174 (comment) that describes a much more convoluted way to interrupt a read() in another thread. The solution I sketched in the issue description is probably easier, but now we have more options... I'm unlikely to find time to implement this soon though. |
This seems to be a common user request, e.g., see #42.
At the kernel level we probably need to send some kind of no-op request on the queue in order to produce a response that run() will read. Then once we've confirmed that run() has exited, we can actually unbind. Unclear whether libnetfilter_queue exposes enough rope to do this.
The text was updated successfully, but these errors were encountered: