go_channels 0.1.1
go_channels: ^0.1.1 copied to clipboard
Go-style concurrency for Dart: typed channels, a faithful select over many channel operations, and structured task scopes with cooperative cancellation.
0.1.1 #
First pub.dev release. The package was developed under the name channels,
which pub.dev rejects as too similar to the existing channel package, so it
is published as go_channels. The import is
package:go_channels/go_channels.dart; the API is unchanged.
- Add a diagram to the README, and declare it as a pub.dev screenshot, showing
the one thing that separates an unbuffered channel from a buffered one: when
sendcompletes. Unbuffered rendezvous —sendfinishes at the receive; buffered letssendreturn while the buffer has room, and blocks only when it is full.
0.1.0 #
- Initial release.
Channel<T>: buffered and unbuffered channels withsend,receive,receiveOr(Go-stylevalue, ok), astreamview, andclose.select: waits on several channel receives/sends at once and runs exactly one, withonDefault(non-blocking) andonTimeoutbranches; random choice among ready branches for fairness.- Structured concurrency:
withTaskScopeandwaitAllrun a group of tasks fail-fast,CancelTokenprovides cooperative cancellation, andwithTimeoutcancels on a deadline.