File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
core/kotlinx-coroutines-io/src/main/kotlin/kotlinx/coroutines/experimental/io Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ interface WriterScope : CoroutineScope {
22
22
23
23
fun writer (coroutineContext : CoroutineContext ,
24
24
channel : ByteChannel ,
25
- block : suspend CoroutineScope .() -> Unit ): WriterJob {
25
+ block : suspend WriterScope .() -> Unit ): WriterJob {
26
26
val coroutine = WriterCoroutine (newCoroutineContext(coroutineContext), channel)
27
27
coroutine.initParentJob(coroutineContext[Job ])
28
28
block.startCoroutine(coroutine, coroutine)
@@ -31,7 +31,7 @@ fun writer(coroutineContext: CoroutineContext,
31
31
32
32
fun writer (coroutineContext : CoroutineContext ,
33
33
autoFlush : Boolean = false,
34
- block : suspend CoroutineScope .() -> Unit ): WriterJob = writer(coroutineContext, ByteChannel (autoFlush), block)
34
+ block : suspend WriterScope .() -> Unit ): WriterJob = writer(coroutineContext, ByteChannel (autoFlush), block)
35
35
36
36
private class WriterCoroutine (ctx : CoroutineContext , channel : ByteChannel )
37
37
: ByteChannelCoroutine (ctx, channel), WriterScope , WriterJob
You can’t perform that action at this time.
0 commit comments