api

combinators.ch

Declarations in combinators.ch

1 declarationsasync

Declarations

Public only
async#
Publicnamespace
namespace async
`Result`: the vtable field type is then `FutureTable` / `Poll`
poll_take_ready#
Publicfunction
func poll_take_ready<T>(p : *Poll<T>) : T
Move the payload out of a `Ready` poll and leave `Pending` behind. Mirrors
SelectState#
Publicstruct
struct SelectState<T> { var a : FutureHandle<T> var b : FutureHandle<T> var vtbl : *FutureTable<T> }
---- select ----------------------------------------------------------------
delete#
function
func delete(self : *SelectState) : void
---- select ----------------------------------------------------------------
select_poll#
Publicfunction
func select_poll<T>(frame : *void, cx : *Context) : Poll<T>
select_drop#
Publicfunction
func select_drop<T>(frame : *void) : void
select#
Publicfunction
func select<T>(a : FutureHandle<T>, b : FutureHandle<T>) : FutureHandle<T>
Become ready with whichever of `a`/`b` completes first. The other is
TimeoutOrState#
Publicstruct
struct TimeoutOrState<T> { var inner : FutureHandle<T> var fallback : Option<T> var start_ms : i64 var millis : i64 var vtbl : *FutureTable<T> }
---- timeout ---------------------------------------------------------------
delete#
function
func delete(self : *TimeoutOrState) : void
---- timeout ---------------------------------------------------------------
timeout_or_poll#
Publicfunction
func timeout_or_poll<T>(frame : *void, cx : *Context) : Poll<T>
timeout_or_drop#
Publicfunction
func timeout_or_drop<T>(frame : *void) : void
timeout_or#
Publicfunction
func timeout_or<T>(handle : FutureHandle<T>, millis : u64, fallback : T) : FutureHandle<T>
Await `handle`, but if it has not completed within `millis` milliseconds
block_on_timeout#
Publicfunction
func block_on_timeout<T>(handle : FutureHandle<T>, millis : u64) : Option<T>
Synchronous variant: drive `handle` to completion on the current thread, but