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
The caveat with how withContext may drop closeable resources (#3504) should be highlighted in the guide:
val socket = withContext(Dispatchers.IO) {
Socket("localhost", 8080)
} // CancellationException can be thrown here, after the resource gets created
socket.use {
// ...
}
The same goes for prompt cancellation guarantees in the other APIs.