Skip to content

Latest commit

 

History

History
27 lines (13 loc) · 521 Bytes

coroutines-tutorial-nio.md

File metadata and controls

27 lines (13 loc) · 521 Bytes

Tutorial. Introduction to NIO with Kotlin coroutines

Setting up a project

TODO

Gradle, Maven, IntelliJ IDEA

  • enable coroutines
  • add dependency on kotlinx.coroutines

Let's look at some common APIs. Java 7 added AsynchronousFileChannel and other non-blocking IO APIs. The kotlinx-coroutines-nio library wraps these APIs into coroutines making them nice and straightforward.

Gradle:

    compile 'org.jetbrains.kotlinx:kotlinx-coroutines-nio:0.6-rc'

Maven: TODO

Non-blocking IO