Make waitForMultipleFutures a top-level function instead of extension

This commit is contained in:
Ilya Gorbunov
2018-11-21 18:44:58 +03:00
committed by Nikolay Igotti
parent ee42edc9a5
commit 901219ed5f
5 changed files with 15 additions and 10 deletions
@@ -29,7 +29,7 @@ fun main() {
val futureSet = futures.toSet()
var consumed = 0
while (consumed < futureSet.size) {
val ready = futureSet.waitForMultipleFutures(10000)
val ready = waitForMultipleFutures(futureSet, 10000)
ready.forEach {
it.consume { result ->
if (result.stringResult != "attempt $attempt result") throw Error("Unexpected $result")