Skip to content

0.15

Compare
Choose a tag to compare
@elizarov elizarov released this 04 May 12:08
· 2825 commits to master since this release

Version 0.15

  • Switched to Kotlin version 1.1.2 (can still be used with 1.1.0).
  • CoroutineStart enum is introduced for launch/async/actor builders:
    • The usage of luanch(context, start = false) is deprecated and is replaced with
      launch(context, CoroutineStart.LAZY)
    • CoroutineStart.UNDISPATCHED is introduced to start coroutine execution immediately in the invoker thread,
      so that async(context, CoroutineStart.UNDISPATCHED) is similar to the behavior of C# async.
    • Guide to UI programming with coroutines mentions the use of it to optimize
      the start of coroutines from UI threads.
  • Introduced BroadcastChannel interface in kotlinx-coroutines-core module:
    • It extends SendChannel interface and provides open function to create subscriptions.
    • Subscriptions are represented with SubscriptionReceiveChannel interface.
    • The corresponding SubscriptionReceiveChannel interfaces are removed from reactive implementation
      modules. They use an interface defined in kotlinx-coroutines-core module.
    • ConflatedBroadcastChannel implementation is provided for state-observation-like use-cases, where a coroutine or a
      regular code (in UI, for example) updates the state that subscriber coroutines shall react to.
    • ArrayBroadcastChannel implementation is provided for event-bus-like use-cases, where a sequence of events shall
      be received by multiple subscribers without any omissions.
    • Guide to reactive streams with coroutines includes
      "Rx Subject vs BroadcastChannel" section.
  • Pull requests from Konrad Kamiński are merged into reactive stream implementations:
    • Support for Project Reactor Mono and Flux.
      See kotlinx-coroutines-reactor module.
    • Implemented Rx1 Completable.awaitCompleted.
    • Added support for Rx2 Maybe.
  • Better timeout support:
    • Introduced withTimeoutOrNull function.
    • Implemented onTimeout clause for select expressions.
    • Fixed spurious concurrency inside withTimeout blocks on their cancellation.
    • Changed the behavior of withTimeout when CancellationException is suppressed inside the block. The
      invocation of withTimeout now always returns the result of the execution of its inner block.
  • The channel property in ActorScope is promoted to a wider Channel type, so that an actor
    can have an easy access to its own inbox send channel.
  • Renamed Mutex.withMutex to Mutex.withLock, old name is deprecated.