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
We currently sleep for `pollInterval` when no new messages have been
polled from the cluster. This leads to unnecessary slowness of the
client. Instead of doing that, we now break up the polling of messages
into two distinct approaches:
1. Attempt to poll synchronously: if there a message is polled, we
return it. If there is no message, we immediately go to step 2.
2. We create a `DispatchQueue` and run the `consumerPoll` on it using
`withTaskExecutorPreference`. We make the `consumerPoll` call wait for
up to `pollInterval` before bailing.
This prevents us from sleeping on the running thread, and frees up
cycles to do other work if required.
Resolvesswift-server#165
---------
Co-authored-by: Konrad `ktoso` Malawski <[email protected]>
0 commit comments