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
Do not cancel subscription on BlockingIterable#hasNext(long, TimeUnit) (#3128)
* Do not cancel subscription on BlockingIterable#hasNext(long, TimeUnit)
This makes sure that if this method, or in extend next(long, TimeUnit) is
called and times out, the caller is able to retry the operation and also
the upstream source will not be cancelled.
In the context of a Blocking Streaming server, this means that if a timeout
is thrown on the incoming request, the outgoing response can still be modified
since the underlying socket will not be immediately closed.
It also aligns the semantics with Single#toFuture where a blocking get with
a timeout on the future also does not cancel the upstream Single.
A (temporary) system property is introduced which allows to fall back to the
old behavior should incompatibilities be discovered in the wild.
A note for the reader who wonders how to close the subscription now: the close()
method always did cancel the subscription and continues to do so.
Copy file name to clipboardexpand all lines: servicetalk-concurrent-api/src/test/java/io/servicetalk/concurrent/api/PublisherAsBlockingIterableTest.java
0 commit comments