Skip to content

0.7.3

Compare
Choose a tag to compare
@circlespainter circlespainter released this 28 Aug 10:42
· 402 commits to 0.7.0 since this release

Breaking changes

  • Kotlin's fiber function has been moved to the co.paralleluniverse.kotlin package, has several convenient overloads and by default will also start the fiber.

New features

  • co.paralleluniverse.kotlin also includes a convenient select syntax to perform channel selection:
val ch1 = Channels.newChannel<Int>(1)
val ch2 = Channels.newChannel<Int>(1)

assertTrue (
    fiber {
        select(Receive(ch1), Send(ch2, 2)) {
            it
        }
    }.get() is Send
)

ch1.send(1)

assertTrue (
    fiber {
        select(Receive(ch1), Send(ch2, 2)) {
            when (it) {
                is Receive -> it.msg
                is Send -> 0
                else -> -1
            }
        }
    }.get() == 1
)
  • The new FiberForkJoinScheduler.onIdle() hook notifies when the fiber scheduler becomes idle.

Improvements

  • Several dependencies upgraded

Closed issues: