Skip to content

Instantly share code, notes, and snippets.

@impatient
Last active January 2, 2019 23:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save impatient/45ba44e5936f372e909f4cf4a7858b42 to your computer and use it in GitHub Desktop.
Save impatient/45ba44e5936f372e909f4cf4a7858b42 to your computer and use it in GitHub Desktop.
s.chunked(3)
.map {
async(dispatcher, start=CoroutineStart.LAZY) {
dataChannel.send( processNumbers(it) )
}
}
.chunked(5)
.forEach {
it.awaitAll()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment