IO: Moved to core directory, documented its unstable status
diff --git a/core/kotlinx-coroutines-io/src/main/kotlin/kotlinx/coroutines/experimental/io/WriterJob.kt b/core/kotlinx-coroutines-io/src/main/kotlin/kotlinx/coroutines/experimental/io/WriterJob.kt
new file mode 100644
index 0000000..fb144ac
--- /dev/null
+++ b/core/kotlinx-coroutines-io/src/main/kotlin/kotlinx/coroutines/experimental/io/WriterJob.kt
@@ -0,0 +1,38 @@
+package kotlinx.coroutines.experimental.io
+
+import kotlinx.coroutines.experimental.CoroutineScope
+import kotlinx.coroutines.experimental.Job
+import kotlinx.coroutines.experimental.newCoroutineContext
+import kotlin.coroutines.experimental.CoroutineContext
+import kotlin.coroutines.experimental.startCoroutine
+
+/**
+ * A coroutine job that is writing to a byte channel
+ */
+interface WriterJob : Job {
+    /**
+     * A reference to the channel that this coroutine is writing to
+     */
+    val channel: ByteReadChannel
+}
+
+interface WriterScope : CoroutineScope {
+    val channel: ByteWriteChannel
+}
+
+fun writer(coroutineContext: CoroutineContext,
+           channel: ByteChannel,
+           block: suspend CoroutineScope.() -> Unit): WriterJob {
+    val coroutine = WriterCoroutine(newCoroutineContext(coroutineContext), channel)
+    coroutine.initParentJob(coroutineContext[Job])
+    block.startCoroutine(coroutine, coroutine)
+    return coroutine
+}
+
+fun writer(coroutineContext: CoroutineContext,
+           autoFlush: Boolean = false,
+           block: suspend CoroutineScope.() -> Unit): WriterJob = writer(coroutineContext, ByteChannel(autoFlush), block)
+
+private class WriterCoroutine(ctx: CoroutineContext, channel: ByteChannel)
+    : ByteChannelCoroutine(ctx, channel), WriterScope, WriterJob
+