SplitScript reference / future
future
namespace
Coordinates lazy asynchronous values without exposing threads or background tasks.
Future combinators only make progress when their returned future is polled with await. They preserve the attachment-lifetime cancellation of their inputs.
Examples
Coordinate alternative asynchronous work
await future.race([nextTick(), nextTick()])
print("one tick operation completed")
Functions
| Member | Description | Available through |
|---|---|---|
| race | Waits for the first operation that completes. | |
| timeout | Waits for an operation until a duration has elapsed. |