Skip to content
Snippets Groups Projects
Commit 5ddbb9d4 authored by Craig Tiller's avatar Craig Tiller
Browse files

Allow specific pollers to be woken

Currently, if two threads call grpc_completion_queue_pluck on the same
completion queue for different tags, there is a 50% chance that we
deliver the completion wakeup to the wrong poller - forcing the correct
poller to wait until its polling times out before it can return an event
up to the application.

This change tweaks our polling interfaces so that we can indeed wake a
specific poller.

Nothing has been performance tuned yet. It's definitely sub-optimal in a
number of places. Wakeup file-descriptors should be recycled. We should
have a path that avoids calling poll() followed by epoll(). We can
probably live without it right at the second though.

This code will fail on Windows at least (I'll do that port when I'm in the office and have a Windows
machine).
parent 4b6a0c73
No related branches found
No related tags found
No related merge requests found
Showing
with 316 additions and 576 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment