Modules / Standard library
std/select_go
Select native Go channels through their boxed interface values. Channels retain native storage and direction; reflect.Select validates the channel and send-value types at runtime and preserves Go's ready-case selection.
Stable Needs: Go target. Shipped in release v0.4.2.
Import with #import "std/select_go".
Case :: struct
Direction :: struct
Value :: struct
SelectResult :: struct { chosen: isize; value: Value; receiveOK: bool; }
Receive :: (channel: Any) -> Case
Send :: (channel: Any, send: Any) -> Case
Default :: () -> Case
Select :: (cases: []Case) -> SelectResult
Source ↗ · All modules