commit | d9ae2bcb88403e0854b895ba46c2417b4c0a4752 | [log] [tgz] |
---|---|---|
author | Roman Elizarov <elizarov@gmail.com> | Fri Oct 20 17:36:56 2017 +0800 |
committer | Roman Elizarov <elizarov@gmail.com> | Fri Oct 20 15:59:28 2017 +0300 |
tree | 20de3e576c0573b802c062a5b82f8dee8cce4a70 | |
parent | bcdd8e17fed40097f9bb8fdb3e218f95ff8603a9 [diff] [blame] |
No Job in newSingleThreadContext and newFixedThreadPoolContext anymore * This resolves the common issue of using `run(ctx)` where ctx comes from either `newSingleThreadContext` or `newFixedThreadPoolContext` invocation. They both used to return a combination of dispatcher + job, and this job was overriding the parent job, thus preventing propagation of cancellation. Not anymore. * ThreadPoolDispatcher class is now public and is the result type for both functions. It has the `close` method to release the thread pool. Fixes #149 Fixes #151
diff --git a/core/kotlinx-coroutines-core/src/test/kotlin/kotlinx/coroutines/experimental/channels/BroadcastChannelMultiReceiveStressTest.kt b/core/kotlinx-coroutines-core/src/test/kotlin/kotlinx/coroutines/experimental/channels/BroadcastChannelMultiReceiveStressTest.kt index 8b087ca..220afbe 100644 --- a/core/kotlinx-coroutines-core/src/test/kotlin/kotlinx/coroutines/experimental/channels/BroadcastChannelMultiReceiveStressTest.kt +++ b/core/kotlinx-coroutines-core/src/test/kotlin/kotlinx/coroutines/experimental/channels/BroadcastChannelMultiReceiveStressTest.kt
@@ -52,7 +52,7 @@ @After fun tearDown() { - pool.cancel() + pool.close() } @Test