You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, call of any waiting method (`wait`, `waitAll` and so on)
with zero timeout blocks execution until all required responses are
received. That's not great because in some scenarios users want to
check if there are any responses ready without blocking execution.
Of course, one can use `wait(1)` which sleeps for only a millisecond,
but anyway it's often unexpected that `wait(0)` sleeps forever. Let's
stick to `epoll_wait` interface - `wait(0)` is non-blocking and
`wait(-1)` blocks forever. Note that before the commit, passing `-1`
would lead to an assertion failure.
Note that we used to block forever in waiting methods by default. To
maintain this behavior, the commit updates default value of timeout
since the old default (zero) means non-blocking polling of connections
now.
Also, the commit makes `wait(0)` non-blocking, but it doesn't poll
connections. We will implement that part in a separate commit for the
sake of clarity of the patch.
Part of #111
0 commit comments