Decide how DefaultAbly
methods should respond to cancellation
#908
Labels
code-quality
Affects the developer experience when working in our codebase.
The methods in
DefaultAbly
do not all cooperate with cancellation. For example, due to its use ofsuspendCoroutine
(as opposed tosuspendCancellableCoroutine
), the suspending version ofconnect
is not cancellable.The implication of this is that if, for example,
connect
is called from within awithTimeout
block, thewithTimeout
call will not return even if the timeout elapses beforeconnect
returns.This has implications on our unit tests, which need to work around this lack of cancellability. I do not know if it has any implications for the public API of the library – for example, whether it impacts users’ ability to wrap
Publisher
methods in awithTimeout
block.We should understand the implications and decide if/how to address them.
The text was updated successfully, but these errors were encountered: