cross_channel 0.6.0
cross_channel: ^0.6.0 copied to clipboard
Fast & flexible channels for Dart/Flutter.
Changelog #
[Unreleased] #
Planned #
- Broadcast ring with lag detection
- Watch channel (coalescing last value)
- Notify primitive (wake one/all)
0.6.0 – 2025-09-01 #
Added #
- Select:
Select.any((s) => s.onReceiver(...).onFuture(...).onStream(...).onTimer(...))- Each branch executes an async block, first to complete wins
- Losing branch are properly cancelled (
recvCancelable, stream cancel) SelectDecision(continueLoop/breakLoop) for loop control- Added
removeRecvWaiterto all buffers - New
recvCancelablehelper inChannelOps
0.5.0 – 2025-08-31 #
Added #
- Timeout helpers:
recvTimeout,sendTimeout
- Batch helpers :
sendAll,recvAll,trySendAll,tryRecvAll
0.4.0 – 2025-09-30 #
Added #
- LatestOnly channels:
MpscandMpmclatestOnly
- Semantics: new sends overwrite previous values
0.3.0 – 2025-08-29 #
Added #
- Isolate adapters:
ReceivePort→Mpsc/Mpmc- Typed request/reply via
SendPort.request
- Web adapters:
MessagePort→Mpsc/Mpmc- Typed requests with
MessageChannel
- Stream adapters:
Receiver.toBroadcastStream,Stream.redirectToSender
0.2.0 – 2025-08-27 #
Added #
- SPSC ring buffer:
- Power-of-two capacity
- Ultra-low overhead
trySend,tryRecv
- OneShot channel:
consumeOnce=true: first receiver consumes and disconnectsconsumeOnce=false: all receivers observe the same value
- Drop policies:
block,oldest,newest - Result extensions:
SendResultX(ok,full,disconnected)RecvResultX(ok,empty,disconnected,valueOrNull)