This interface is a heavily modified version of this implementation, based on this Zulip discussion.
-
Futures are functions that may suspend. The interface provides four primary methods for executing tasks asynchronously:
join
,select
,spawn
, andcancel
. -
join
: Waits for all given futures or poolers to complete. -
select
: Waits for the first future or pooler to complete, and cancels all others. -
spawn
: Launches a new task concurrently and returns a handle that can be converted into a pooler. -
cancel
: Cancels a previously spawned task.
Currently, most functions for working with TCP sockets are implemented, along with file reading and writing functions.
At the moment, this runtime only works on linux, contributions from anyone who knows a bit about windows are welcome.