Created
March 20, 2019 08:18
-
-
Save manuelvicnt/929650b1799cbaed97bda85b839e3f3a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal class CloseableCoroutineScope( | |
context: CoroutineContext | |
) : Closeable, CoroutineScope { | |
override val coroutineContext: CoroutineContext = context | |
override fun close() { | |
coroutineContext.cancel() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment