Scala Coroutines are released since Scala 2.11. To start using them, you will need to add the official JAR to your project dependencies. Here we assume that you are using SBT, otherwise you can follow the guidelines on Maven.
Stable versions are released on Sonatype and Maven. You can add Scala Coroutines by adding the following to your project definition:
libraryDependencies ++= Seq( "com.storm-enroute" %% "coroutines" % "0.6")
Snapshot versions are released regularly on Sonatype:
resolvers ++= Seq( "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots", "Sonatype OSS Releases" at "https://oss.sonatype.org/content/repositories/releases" ) libraryDependencies ++= Seq( "com.storm-enroute" %% "coroutines" % "0.7-SNAPSHOT")
To use coroutines in the code, import the
and you’re all set:
In case you have the dependencies configured, you can proceed immediately to the next section.