Menu
Reference
- Manticore\Ds
- Async
- Classes
- AggregateError
- CancellationToken
- CancelledException
- Channel
- ChannelClosedException
- Context
- DeadlockException
- Mutex
- Once
- Pool
- Received
- SelectCase
- Selected
- Semaphore
- Settled
- Task
- TaskGroup
- TimeoutException
- Functions
- async()
- awaitAll()
- awaitAllSettled()
- awaitAny()
- channel()
- delay()
- dump()
- dumpOn()
- failure()
- group()
- mapConcurrent()
- mapSettled()
- readFile()
- select()
- selectNow()
- selectWithin()
- shield()
- shutdownOn()
- spawn()
- stats()
- timeout()
- watchdog()
- writeFile()
- Http
- Http\WebSocket
- Buffer
- Process
- Io\Poll
- Manticore\Sapi
- Ffi
Async
Classes
AggregateError | Several task errors as one throwable. |
CancellationToken | The read-only half of cancellation. |
CancelledException | Raised inside a task that was cancelled. |
Channel | A typed pipe between tasks, in the style of a Go channel. |
ChannelClosedException | Thrown when sending to a closed channel. |
Context | The ambient view of the scope the calling task is in: cancellation, the effective deadline, and scoped values. |
DeadlockException | Thrown by async() when the loop runs out of work while tasks are still parked. |
Mutex | A mutual-exclusion lock for a critical section that spans a suspend point. |
Once | Run something exactly once, however many tasks ask for it. |
Pool | A bounded, FIFO pool of connections (or any objects), shared by tasks. |
Received | One receive from a channel, as an object. |
SelectCase | One arm of a select(). |
Selected | Which select() case fired, and with what. |
Semaphore | A counting semaphore: the bound on "do N of these at a time". |
Settled | How one task turned out, when you asked for the outcome rather than the value. |
Task | A running unit of async work: a green thread plus its settled state. |
TaskGroup | A structured-concurrency scope (a "nursery"). |
TimeoutException | Thrown when a deadline elapses before the work finishes. |
Functions
async() | Run $main to completion on the async engine and return its value. |
awaitAll() | Wait for every task and return their results keyed by input position. |
awaitAllSettled() | Wait for every task and report how each one turned out. |
awaitAny() | Wait for the first successful task and return its value. |
channel() | Make a channel. |
delay() | Suspend the current task for $seconds without blocking the loop. |
dump() | A snapshot of the engine as text. |
dumpOn() | Print dump() to STDERR whenever one of $signals arrives. |
failure() | Where the last failure came from. |
group() | Open a child scope and return the body's value. |
mapConcurrent() | Map $fn over $items with at most $limit calls running at once. |
mapSettled() | mapConcurrent() that collects outcomes instead of failing fast. |
readFile() | Read a whole file in chunks, yielding to other tasks between them. |
select() | Wait for whichever case is ready first. |
selectNow() | The non-blocking select() (Go's default: arm). |
selectWithin() | select() with a deadline (Go's time.After arm). |
shield() | Hold cancellation back while $body runs. |
shutdownOn() | Graceful shutdown: on any of $signals, cancel the root scope. |
spawn() | Spawn a concurrent task into the scope open in the calling task and return a handle. |
stats() | Engine counters. |
timeout() | Run $body in a scope that must finish within $seconds. |
watchdog() | Name any task that holds the loop longer than $milliseconds. |
writeFile() | Write $data to a file in chunks, yielding to other tasks between them. |