# TrueAsync Documentation > Native async/await for PHP: coroutines, structured concurrency, channels, connection pooling — built into the language core. ## Table of Contents - [Architecture](https://true-async.github.io/en/architecture.md): Internal design of TrueAsync components -- resource pool, PDO Pool, diagrams, and C API. - [Async\CpuSnapshot](https://true-async.github.io/en/docs/reference/cpu-snapshot.md): Async\CpuSnapshot — immutable snapshot of process and system CPU counters. Low-level source for custom delta calculations. - [Async\Pool Architecture](https://true-async.github.io/en/architecture/pool.md): Internal design of the universal resource pool Async\Pool -- data structures, acquire/release algorithms, healthcheck, circuit breaker. - [Async\Pool: Universal Resource Pool](https://true-async.github.io/en/docs/components/pool.md): Async\Pool -- universal resource pool for coroutines: creation, acquire/release, healthcheck, circuit breaker. - [Async\Thread: running PHP in a separate thread](https://true-async.github.io/en/docs/components/threads.md): Async\Thread — running code in a separate parallel thread: data transfer, WeakReference/WeakMap, ThreadChannel, Future between threads. - [Async\ThreadChannel: channels between OS threads](https://true-async.github.io/en/docs/components/thread-channels.md): Async\ThreadChannel — a thread-safe channel for passing data between OS threads in TrueAsync. - [Async\ThreadPool: worker thread pool](https://true-async.github.io/en/docs/components/thread-pool.md): Async\ThreadPool — a pool of worker threads for parallel CPU-bound task execution in TrueAsync. - [available_parallelism()](https://true-async.github.io/en/docs/reference/available-parallelism.md): Async\available_parallelism() — returns the number of CPUs available to the process. Honours cgroup quotas, affinity, and container limits. - [await](https://true-async.github.io/en/docs/reference/await.md): await() — waiting for a coroutine or Future to complete. Full documentation: parameters, exceptions, examples. - [Await](https://true-async.github.io/en/tutors/03-await.md): Why await() is needed and how it works with coroutines. - [await_all_or_fail()](https://true-async.github.io/en/docs/reference/await-all-or-fail.md): await_all_or_fail() — wait for all tasks to complete; throws an exception on the first error. - [await_all()](https://true-async.github.io/en/docs/reference/await-all.md): await_all() — wait for all tasks with tolerance for partial failures. - [await_any_of_or_fail()](https://true-async.github.io/en/docs/reference/await-any-of-or-fail.md): await_any_of_or_fail() — wait for the first N successfully completed tasks. - [await_any_of()](https://true-async.github.io/en/docs/reference/await-any-of.md): await_any_of() — wait for the first N tasks with tolerance for partial failures. - [await_any_or_fail()](https://true-async.github.io/en/docs/reference/await-any-or-fail.md): await_any_or_fail() — wait for the first completed task. - [await_first_success()](https://true-async.github.io/en/docs/reference/await-first-success.md): await_first_success() — wait for the first successfully completed task, ignoring errors from others. - [Base Interfaces](https://true-async.github.io/en/docs/components/interfaces.md): Base TrueAsync interfaces -- Awaitable, Completable, Timeout, ScopeProvider and SpawnStrategy. - [Byte Streams](https://true-async.github.io/en/tutors-server/04-streaming-uploads.md): send() and sendable(), streaming the body, file uploads, and sendFile(). - [Cancellation](https://true-async.github.io/en/docs/components/cancellation.md): Coroutine cancellation in TrueAsync -- cooperative cancellation, critical sections with protect(), cascading cancellation via Scope, timeouts. - [Cancellation](https://true-async.github.io/en/tutors/02-cancellation.md): How cancel() works, and cooperative coroutine cancellation. - [Channel::__construct](https://true-async.github.io/en/docs/reference/channel/construct.md): Create a new channel for exchanging data between coroutines. - [Channel::capacity](https://true-async.github.io/en/docs/reference/channel/capacity.md): Get the channel buffer capacity. - [Channel::close](https://true-async.github.io/en/docs/reference/channel/close.md): Close the channel for further data sending. - [Channel::count](https://true-async.github.io/en/docs/reference/channel/count.md): Get the number of values in the channel buffer. - [Channel::getIterator](https://true-async.github.io/en/docs/reference/channel/get-iterator.md): Get an iterator to traverse channel values using foreach. - [Channel::isClosed](https://true-async.github.io/en/docs/reference/channel/is-closed.md): Check if the channel is closed. - [Channel::isEmpty](https://true-async.github.io/en/docs/reference/channel/is-empty.md): Check if the channel buffer is empty. - [Channel::isFull](https://true-async.github.io/en/docs/reference/channel/is-full.md): Check if the channel buffer is full. - [Channel::recv](https://true-async.github.io/en/docs/reference/channel/recv.md): Receive a value from the channel (blocking operation). - [Channel::recvAsync](https://true-async.github.io/en/docs/reference/channel/recv-async.md): Non-blocking receive of a value from the channel, returns a Future. - [Channel::send](https://true-async.github.io/en/docs/reference/channel/send.md): Send a value to the channel (blocking operation). - [Channel::sendAsync](https://true-async.github.io/en/docs/reference/channel/send-async.md): Non-blocking send of a value to the channel. - [Channels](https://true-async.github.io/en/docs/components/channels.md): Channels in TrueAsync -- safe data transfer between coroutines, task queues, and backpressure. - [Channels](https://true-async.github.io/en/tutors/07-channels.md): Channel: a stream of values between coroutines, a worker pool, and backpressure. - [Concurrency Inside a Request](https://true-async.github.io/en/tutors-server/03-concurrency-inside.md): TaskGroup in a handler, the PDO Pool under load, and request_context(). - [Concurrent Iterator](https://true-async.github.io/en/tutors/12-iterate.md): iterate(): concurrent collection traversal in a single line, generators, and early exit. - [Connection Pool and Transactions](https://true-async.github.io/en/tutors-laravel/02-pool-transactions.md): PDO Pool under Eloquent and CoroutineTransactions: why the nested transaction counter can't stay on a Connection property. - [Context](https://true-async.github.io/en/tutors/15-context.md): Context: where to keep "the current one" once global variables stop working. - [Context: Execution Contexts](https://true-async.github.io/en/docs/components/context.md): Context in TrueAsync -- storing data in scope hierarchy, local and inherited values, analogous to Go context.Context. - [Context::find](https://true-async.github.io/en/docs/reference/context/find.md): Find a value by key in the current or parent context. - [Context::findLocal](https://true-async.github.io/en/docs/reference/context/find-local.md): Find a value only in the local context (without searching parent contexts). - [Context::get](https://true-async.github.io/en/docs/reference/context/get.md): Get a value from context. Throws an exception if the key is not found. - [Context::getLocal](https://true-async.github.io/en/docs/reference/context/get-local.md): Get a value only from the local context. Throws an exception if not found. - [Context::has](https://true-async.github.io/en/docs/reference/context/has.md): Check if a key exists in the current or parent context. - [Context::hasLocal](https://true-async.github.io/en/docs/reference/context/has-local.md): Check if a key exists only in the local context. - [Context::set](https://true-async.github.io/en/docs/reference/context/set.md): Set a value in the context by key. - [Context::unset](https://true-async.github.io/en/docs/reference/context/unset.md): Remove a value by key from the context. - [Contributing](https://true-async.github.io/en/contributing.md): How to help TrueAsync grow — code, documentation, testing and community - [Coroutine Wait and Wake-up Mechanism](https://true-async.github.io/en/architecture/waker.md): Internal design of the Waker -- the link between coroutines and events: statuses, resume_when, timeout, error delivery. - [coroutine_context()](https://true-async.github.io/en/docs/reference/coroutine-context.md): coroutine_context() — get the private context of the current coroutine. - [Coroutine::asHiPriority](https://true-async.github.io/en/docs/reference/coroutine/as-hi-priority.md): Mark the coroutine as high-priority for the scheduler. - [Coroutine::cancel](https://true-async.github.io/en/docs/reference/coroutine/cancel.md): Cancel coroutine execution. - [Coroutine::finally](https://true-async.github.io/en/docs/reference/coroutine/on-finally.md): Register a handler to be called when the coroutine completes. - [Coroutine::getAwaitingInfo](https://true-async.github.io/en/docs/reference/coroutine/get-awaiting-info.md): Get information about what the coroutine is awaiting. - [Coroutine::getContext](https://true-async.github.io/en/docs/reference/coroutine/get-context.md): Get the local context of a coroutine. - [Coroutine::getException](https://true-async.github.io/en/docs/reference/coroutine/get-exception.md): Get the exception that occurred in a coroutine. - [Coroutine::getId](https://true-async.github.io/en/docs/reference/coroutine/get-id.md): Get the unique identifier of a coroutine. - [Coroutine::getResult](https://true-async.github.io/en/docs/reference/coroutine/get-result.md): Get the result of coroutine execution. - [Coroutine::getSpawnFileAndLine](https://true-async.github.io/en/docs/reference/coroutine/get-spawn-file-and-line.md): Get the file and line where the coroutine was created. - [Coroutine::getSpawnLocation](https://true-async.github.io/en/docs/reference/coroutine/get-spawn-location.md): Get the coroutine creation location as a string. - [Coroutine::getSuspendFileAndLine](https://true-async.github.io/en/docs/reference/coroutine/get-suspend-file-and-line.md): Get the file and line where the coroutine is suspended. - [Coroutine::getSuspendLocation](https://true-async.github.io/en/docs/reference/coroutine/get-suspend-location.md): Get the coroutine suspension location as a string. - [Coroutine::getTrace](https://true-async.github.io/en/docs/reference/coroutine/get-trace.md): Get the call stack of a suspended coroutine. - [Coroutine::isCancellationRequested](https://true-async.github.io/en/docs/reference/coroutine/is-cancellation-requested.md): Check whether cancellation has been requested for the coroutine. - [Coroutine::isCancelled](https://true-async.github.io/en/docs/reference/coroutine/is-cancelled.md): Check whether the coroutine has been cancelled. - [Coroutine::isCompleted](https://true-async.github.io/en/docs/reference/coroutine/is-completed.md): Check whether the coroutine has completed. - [Coroutine::isQueued](https://true-async.github.io/en/docs/reference/coroutine/is-queued.md): Check whether the coroutine is in the scheduler queue. - [Coroutine::isRunning](https://true-async.github.io/en/docs/reference/coroutine/is-running.md): Check whether the coroutine is currently executing. - [Coroutine::isStarted](https://true-async.github.io/en/docs/reference/coroutine/is-started.md): Check whether the coroutine has been started by the scheduler. - [Coroutine::isSuspended](https://true-async.github.io/en/docs/reference/coroutine/is-suspended.md): Check whether the coroutine is suspended. - [Coroutines, Scheduler, and Reactor](https://true-async.github.io/en/architecture/scheduler-reactor.md): Internal design of the coroutine scheduler and event reactor -- queues, context switching, libuv, fiber pool. - [cpu_usage()](https://true-async.github.io/en/docs/reference/cpu-usage.md): Async\cpu_usage() — current process and system load with automatic delta computation between calls. Convenient for telemetry. - [Creating Coroutines](https://true-async.github.io/en/tutors/01-coroutines.md): A first look at coroutines: spawn() and concurrent execution. - [current_context()](https://true-async.github.io/en/docs/reference/current-context.md): current_context() — get the context of the current Scope. - [current_coroutine()](https://true-async.github.io/en/docs/reference/current-coroutine.md): current_coroutine() — get the object of the currently executing coroutine. - [delay](https://true-async.github.io/en/docs/reference/delay.md): delay() — suspend a coroutine for a given number of milliseconds. - [Documentation](https://true-async.github.io/en/docs.md): TrueAsync Documentation. Learn how to install and use true asynchronous primitives for PHP. - [Download](https://true-async.github.io/en/download.md): Download and install TrueAsync — kernel-level asynchrony for PHP. - [Empirical Evidence: Why Single-Threaded Coroutines Work](https://true-async.github.io/en/docs/evidence/coroutines-evidence.md): Empirical evidence: context switch cost measurements, memory comparison, the C10K problem, academic research. - [Events and the Event Model](https://true-async.github.io/en/architecture/events.md): The base zend_async_event_t structure -- foundation of all asynchronous operations, callback system, flags, event hierarchy. - [Exceptions](https://true-async.github.io/en/docs/components/exceptions.md): TrueAsync exception hierarchy -- AsyncCancellation, TimeoutException, DeadlockError and others. - [Exceptions in Coroutines](https://true-async.github.io/en/tutors/04-exceptions.md): How exceptions from a coroutine propagate through await(). - [Fibers in TrueAsync](https://true-async.github.io/en/architecture/fibers.md): How TrueAsync changes Fiber behavior — coroutine mode, GC, refcount, parameters, exit/bailout, destructors. - [FileSystemWatcher: Filesystem Monitoring](https://true-async.github.io/en/docs/components/filesystem-watcher.md): FileSystemWatcher in TrueAsync -- a persistent filesystem observer with foreach iteration support, event buffering, and two storage modes. - [FileSystemWatcher::__construct](https://true-async.github.io/en/docs/reference/filesystem-watcher/construct.md): Create a new FileSystemWatcher and start watching files or a directory. - [FileSystemWatcher::close](https://true-async.github.io/en/docs/reference/filesystem-watcher/close.md): Stop watching the file system and end iteration. - [FileSystemWatcher::getIterator](https://true-async.github.io/en/docs/reference/filesystem-watcher/get-iterator.md): Get an asynchronous iterator for foreach traversal of file system events. - [FileSystemWatcher::isClosed](https://true-async.github.io/en/docs/reference/filesystem-watcher/is-closed.md): Check if file system watching has been stopped. - [FrankenPHP + TrueAsync](https://true-async.github.io/en/docs/frankenphp.md): Running TrueAsync PHP with FrankenPHP — Docker quick start, building from source, Caddyfile configuration, async worker entrypoint, graceful restart, and troubleshooting. - [FrankenPHP\Request](https://true-async.github.io/en/docs/reference/frankenphp/request.md): FrankenPHP\Request class — access HTTP request data (method, URI, headers, body, query parameters, cookies, uploaded files) inside an async worker. - [FrankenPHP\Response](https://true-async.github.io/en/docs/reference/frankenphp/response.md): FrankenPHP\Response class — set status codes, headers, write body content, redirect, and send the HTTP response from an async worker. - [FrankenPHP\UploadedFile](https://true-async.github.io/en/docs/reference/frankenphp/uploaded-file.md): FrankenPHP\UploadedFile class — access uploaded file metadata (name, type, size) and move files to a permanent location. - [Future](https://true-async.github.io/en/tutors/06-future.md): Future and FutureState: a promise of a result that isn't tied to a coroutine. - [Future: A Promise of a Result](https://true-async.github.io/en/docs/components/future.md): Future in TrueAsync -- a promise of a result, transformation chains map/catch/finally, FutureState and diagnostics. - [Future::__construct](https://true-async.github.io/en/docs/reference/future/construct.md): Creates a Future bound to a FutureState. - [Future::await](https://true-async.github.io/en/docs/reference/future/await.md): Await the Future result. - [Future::cancel](https://true-async.github.io/en/docs/reference/future/cancel.md): Cancels the Future. - [Future::catch](https://true-async.github.io/en/docs/reference/future/catch.md): Handle a Future error. - [Future::completed](https://true-async.github.io/en/docs/reference/future/completed.md): Creates an already completed Future with a result. - [Future::failed](https://true-async.github.io/en/docs/reference/future/failed.md): Creates a Future completed with an error. - [Future::finally](https://true-async.github.io/en/docs/reference/future/finally.md): Callback that always executes on Future completion. - [Future::getAwaitingInfo](https://true-async.github.io/en/docs/reference/future/get-awaiting-info.md): Debug information about awaiting coroutines. - [Future::getCompletedFileAndLine](https://true-async.github.io/en/docs/reference/future/get-completed-file-and-line.md): Future completion location as an array. - [Future::getCompletedLocation](https://true-async.github.io/en/docs/reference/future/get-completed-location.md): Future completion location as a string. - [Future::getCreatedFileAndLine](https://true-async.github.io/en/docs/reference/future/get-created-file-and-line.md): Future creation location as an array. - [Future::getCreatedLocation](https://true-async.github.io/en/docs/reference/future/get-created-location.md): Future creation location as a string. - [Future::ignore](https://true-async.github.io/en/docs/reference/future/ignore.md): Do not propagate unhandled errors to the event loop handler. - [Future::isCancelled](https://true-async.github.io/en/docs/reference/future/is-cancelled.md): Checks whether the Future is cancelled. - [Future::isCompleted](https://true-async.github.io/en/docs/reference/future/is-completed.md): Checks whether the Future is completed. - [Future::map](https://true-async.github.io/en/docs/reference/future/map.md): Transform the Future result. - [Garbage Collection in Asynchronous Context](https://true-async.github.io/en/architecture/async-gc.md): How PHP GC works with coroutines, scope, and contexts -- get_gc handlers, zombie coroutines, circular references. - [get_coroutines()](https://true-async.github.io/en/docs/reference/get-coroutines.md): get_coroutines() — get a list of all active coroutines for diagnostics. - [graceful_shutdown()](https://true-async.github.io/en/docs/reference/graceful-shutdown.md): graceful_shutdown() — graceful scheduler shutdown with cancellation of all coroutines. - [gRPC](https://true-async.github.io/en/tutors-server/10-grpc.md): addGrpcHandler(): unary and streaming, readMessage/writeMessage, trailers, and deadlines. - [How Coroutines Work](https://true-async.github.io/en/interactive/coroutine-demo.md): Interactive visualization of how coroutines work in TrueAsync - [HTTP compression](https://true-async.github.io/en/docs/server/compression.md): gzip, Brotli, and zstd in TrueAsync Server: Accept-Encoding negotiation, MIME filter, limits, BREACH mitigation, inbound body decoding. - [INI Settings](https://true-async.github.io/en/docs/reference/ini-settings.md): php.ini configuration directives for the TrueAsync extension. - [IO-Bound vs CPU-bound](https://true-async.github.io/en/docs/evidence/concurrency-efficiency.md): Concurrency efficiency analysis for IO-bound and CPU-bound tasks. Little's Law, Goetz's formula, calculating the optimal number of coroutines. - [iterate](https://true-async.github.io/en/docs/reference/iterate.md): iterate() — concurrent iteration over an array or Traversable with concurrency control and lifecycle management of spawned coroutines. - [Limiting How Long await Waits](https://true-async.github.io/en/tutors/05-timeout.md): Limiting how long await() waits, using timeout(). - [loadavg](https://true-async.github.io/en/docs/reference/loadavg.md): Async\loadavg() — 1/5/15-minute load average. POSIX; returns null on Windows. - [Motivation](https://true-async.github.io/en/motivation.md): Why PHP needs built-in asynchronous capabilities - [Multi-worker](https://true-async.github.io/en/docs/server/workers.md): setWorkers(N): built-in thread pool on Async\ThreadPool. Bootloader, SO_REUSEPORT, per-request scope, request_context(). - [Observability](https://true-async.github.io/en/docs/server/observability.md): Request statistics with getStats(), a Prometheus /metrics endpoint and Grafana, structured logging and an access log with setLogSinks(), and runtime counters. - [PDO Pool](https://true-async.github.io/en/tutors/09-pdo-pool.md): Why coroutines can't share a single PDO, and how the built-in connection pool solves that transparently. - [PDO Pool Architecture](https://true-async.github.io/en/architecture/pdo-pool.md): Internal design of PDO Pool -- components, connection lifecycle, binding to coroutines, credentials management. - [PDO Pool: Database Connection Pool](https://true-async.github.io/en/docs/components/pdo-pool.md): PDO Pool -- built-in database connection pool for coroutines: transparent pooling, transactions, automatic rollback. - [Pool](https://true-async.github.io/en/tutors/13-pool.md): Async\Pool: a universal resource pool with health checks and a circuit breaker. - [Pool::__construct](https://true-async.github.io/en/docs/reference/pool/construct.md): Create a new resource pool. - [Pool::acquire](https://true-async.github.io/en/docs/reference/pool/acquire.md): Acquire a resource from the pool with waiting. - [Pool::activate](https://true-async.github.io/en/docs/reference/pool/activate.md): Force the pool into the ACTIVE state. - [Pool::activeCount](https://true-async.github.io/en/docs/reference/pool/active-count.md): Number of active resources in the pool. - [Pool::close](https://true-async.github.io/en/docs/reference/pool/close.md): Close the pool and destroy all resources. - [Pool::count](https://true-async.github.io/en/docs/reference/pool/count.md): Total number of resources in the pool. - [Pool::deactivate](https://true-async.github.io/en/docs/reference/pool/deactivate.md): Force the pool into the INACTIVE state. - [Pool::getState](https://true-async.github.io/en/docs/reference/pool/get-state.md): Get the current Circuit Breaker state. - [Pool::idleCount](https://true-async.github.io/en/docs/reference/pool/idle-count.md): Number of idle resources in the pool. - [Pool::isClosed](https://true-async.github.io/en/docs/reference/pool/is-closed.md): Check if the pool is closed. - [Pool::recover](https://true-async.github.io/en/docs/reference/pool/recover.md): Transition the pool to the RECOVERING state. - [Pool::release](https://true-async.github.io/en/docs/reference/pool/release.md): Release a resource back to the pool. - [Pool::setCircuitBreakerStrategy](https://true-async.github.io/en/docs/reference/pool/set-circuit-breaker-strategy.md): Set the Circuit Breaker strategy for the pool. - [Pool::tryAcquire](https://true-async.github.io/en/docs/reference/pool/try-acquire.md): Non-blocking resource acquisition from the pool. - [Production](https://true-async.github.io/en/tutors-server/09-production.md): Timeouts, limits, backpressure on accept, compression, logs, and graceful shutdown. - [protect](https://true-async.github.io/en/docs/reference/protect.md): protect() — execute code in a non-cancellable mode to protect critical sections. - [Python asyncio in Practice: Real-World Measurements](https://true-async.github.io/en/docs/evidence/python-evidence.md): Python asyncio in practice: Duolingo, Super.com, Instagram, uvloop benchmarks, counter-arguments. - [Request and Response](https://true-async.github.io/en/tutors-server/02-request-response.md): HttpRequest and HttpResponse: routing, json(), and errors via HttpException. - [Request and response streaming](https://true-async.github.io/en/docs/server/streaming.md): readBody(): pull-based request body streaming. send()/sendable(): chunked response streaming with backpressure. HTTP/2 trailers. - [request_context()](https://true-async.github.io/en/docs/reference/request-context.md): Async\request_context() — shared request context visible to the entire handler coroutine tree. Bound to the request scope set by the embedding C code (HTTP server). - [RFC](https://true-async.github.io/en/rfc.md): Official proposals for adding asynchronous capabilities to PHP core - [Roadmap](https://true-async.github.io/en/roadmap.md): Development plan for TrueAsync - [root_context()](https://true-async.github.io/en/docs/reference/root-context.md): root_context() — get the global root context visible from all scopes. - [Running Laravel Inside a Coroutine Server](https://true-async.github.io/en/tutors-laravel/01-start.md): Step by step: running Laravel under TrueAsync Server and your first API, from routes to the database. - [Scope](https://true-async.github.io/en/tutors/08-scope.md): Scope: who owns coroutines, waits for them to finish, and cancels the whole group. - [Scope: Managing Coroutine Lifetimes](https://true-async.github.io/en/docs/components/scope.md): Scope in TrueAsync -- managing coroutine lifetimes, hierarchy, group cancellation, error handling and structured concurrency. - [Scope::__construct](https://true-async.github.io/en/docs/reference/scope/construct.md): Creates a new root Scope. - [Scope::asNotSafely](https://true-async.github.io/en/docs/reference/scope/as-not-safely.md): Marks the scope as not safe — coroutines receive cancellation instead of becoming zombies. - [Scope::awaitAfterCancellation](https://true-async.github.io/en/docs/reference/scope/await-after-cancellation.md): Waits for all coroutines including zombies to complete after scope cancellation. - [Scope::awaitCompletion](https://true-async.github.io/en/docs/reference/scope/await-completion.md): Waits for active coroutines in the scope to complete. - [Scope::cancel](https://true-async.github.io/en/docs/reference/scope/cancel.md): Cancels all coroutines in the scope. - [Scope::dispose](https://true-async.github.io/en/docs/reference/scope/dispose.md): Cancels all coroutines and closes the scope. - [Scope::disposeAfterTimeout](https://true-async.github.io/en/docs/reference/scope/dispose-after-timeout.md): Closes the scope after a specified timeout. - [Scope::disposeSafely](https://true-async.github.io/en/docs/reference/scope/dispose-safely.md): Safely closes the scope — coroutines become zombies. - [Scope::finally](https://true-async.github.io/en/docs/reference/scope/on-finally.md): Registers a callback to be invoked when the scope completes. - [Scope::getChildScopes](https://true-async.github.io/en/docs/reference/scope/get-child-scopes.md): Returns an array of child scopes. - [Scope::inherit](https://true-async.github.io/en/docs/reference/scope/inherit.md): Creates a new Scope that inherits from a specified or current scope. - [Scope::isCancelled](https://true-async.github.io/en/docs/reference/scope/is-cancelled.md): Checks whether the scope is cancelled. - [Scope::isClosed](https://true-async.github.io/en/docs/reference/scope/is-closed.md): Checks whether the scope is closed. - [Scope::isFinished](https://true-async.github.io/en/docs/reference/scope/is-finished.md): Checks whether the scope is finished. - [Scope::provideScope](https://true-async.github.io/en/docs/reference/scope/provide-scope.md): ScopeProvider interface implementation — returns the current scope. - [Scope::setChildScopeExceptionHandler](https://true-async.github.io/en/docs/reference/scope/set-child-scope-exception-handler.md): Sets an exception handler for child Scopes. - [Scope::setExceptionHandler](https://true-async.github.io/en/docs/reference/scope/set-exception-handler.md): Sets an exception handler for child coroutines. - [Scope::spawn](https://true-async.github.io/en/docs/reference/scope/spawn.md): Spawns a coroutine in the given scope. - [Server-Sent Events](https://true-async.github.io/en/docs/server/sse.md): sseStart()/sseEvent()/sseComment()/sseRetry(): ready-made text/event-stream helpers over HTTP/1.1, HTTP/2, and HTTP/3. - [Server-Sent Events](https://true-async.github.io/en/tutors-server/06-sse.md): SSE: an event stream to the browser, import progress, and heartbeat via sseComment(). - [signal](https://true-async.github.io/en/docs/reference/signal.md): signal() — wait for an OS signal with cancellation support via Completable. - [spawn](https://true-async.github.io/en/docs/reference/spawn.md): spawn() — launch a function in a new coroutine. Full documentation: parameters, return value, examples. - [spawn_thread()](https://true-async.github.io/en/docs/reference/spawn-thread.md): spawn_thread() — run a closure in a new OS thread. Full documentation: parameters, data transfer, exceptions, examples. - [spawn_with()](https://true-async.github.io/en/docs/reference/spawn-with.md): spawn_with() — launch a coroutine in a specified Scope or via a ScopeProvider. - [SSE and gRPC with Laravel](https://true-async.github.io/en/tutors-laravel/03-sse-grpc.md): trueasync_response(), Sse, and grpc_handlers: reaching past the buffered Illuminate Response right from a controller. - [Static Files](https://true-async.github.io/en/tutors-server/05-static.md): StaticHandler: serving files without a PHP coroutine, caching, and security policies. - [Static files and sendFile](https://true-async.github.io/en/docs/server/static-files.md): StaticHandler: built-in static delivery without a PHP handler. sendFile(): handler-driven file delivery. Precompressed sidecars, ETag, Range, security policies. - [Statistical Data for Concurrency Calculation](https://true-async.github.io/en/docs/evidence/real-world-statistics.md): Real-world statistical data for concurrency calculation: SQL queries, DB latencies, PHP framework throughput. - [Supported Functions](https://true-async.github.io/en/docs/reference/supported-functions.md): Complete list of PHP functions adapted for coroutine-aware non-blocking operation in TrueAsync. - [suspend](https://true-async.github.io/en/docs/reference/suspend.md): suspend() — suspend execution of the current coroutine. Full documentation: cooperative multitasking examples. - [Swoole in Practice: Real-World Measurements](https://true-async.github.io/en/docs/evidence/swoole-evidence.md): Swoole in practice: production cases from Appwrite and IdleMMO, independent benchmarks, TechEmpower, comparison with PHP-FPM. - [TaskGroup](https://true-async.github.io/en/tutors/10-task-group.md): TaskGroup: a group of tasks with results, and the all, race, any waiting strategies. - [TaskGroup::__construct](https://true-async.github.io/en/docs/reference/task-group/construct.md): Create a new TaskGroup with optional concurrency limit. - [TaskGroup::all](https://true-async.github.io/en/docs/reference/task-group/all.md): Create a Future that resolves with an array of all task results. - [TaskGroup::any](https://true-async.github.io/en/docs/reference/task-group/any.md): Create a Future that resolves with the result of the first successful task. - [TaskGroup::awaitCompletion](https://true-async.github.io/en/docs/reference/task-group/await-completion.md): Wait for all tasks to complete without throwing exceptions. - [TaskGroup::cancel](https://true-async.github.io/en/docs/reference/task-group/cancel.md): Cancel all tasks in the group. - [TaskGroup::close](https://true-async.github.io/en/docs/reference/task-group/close.md): Close the group to prevent new tasks. - [TaskGroup::count](https://true-async.github.io/en/docs/reference/task-group/count.md): Get the total number of tasks in the group. - [TaskGroup::dispose](https://true-async.github.io/en/docs/reference/task-group/dispose.md): Dispose of the group scope. - [TaskGroup::finally](https://true-async.github.io/en/docs/reference/task-group/finally.md): Register a completion handler for the group. - [TaskGroup::getErrors](https://true-async.github.io/en/docs/reference/task-group/get-errors.md): Get an array of errors from failed tasks. - [TaskGroup::getIterator](https://true-async.github.io/en/docs/reference/task-group/get-iterator.md): Get an iterator to traverse results as tasks complete. - [TaskGroup::getResults](https://true-async.github.io/en/docs/reference/task-group/get-results.md): Get an array of results from completed tasks. - [TaskGroup::isClosed](https://true-async.github.io/en/docs/reference/task-group/is-closed.md): Check if the group is closed. - [TaskGroup::isFinished](https://true-async.github.io/en/docs/reference/task-group/is-finished.md): Check if all tasks are finished. - [TaskGroup::race](https://true-async.github.io/en/docs/reference/task-group/race.md): Create a Future that resolves with the result of the first completed task. - [TaskGroup::spawn](https://true-async.github.io/en/docs/reference/task-group/spawn.md): Add a task to the group with an auto-incremented key. - [TaskGroup::spawnWithKey](https://true-async.github.io/en/docs/reference/task-group/spawn-with-key.md): Add a task to the group with an explicit key. - [TaskGroup::suppressErrors](https://true-async.github.io/en/docs/reference/task-group/suppress-errors.md): Mark all current errors as handled. - [TaskSet](https://true-async.github.io/en/tutors/11-task-set.md): TaskSet: a self-cleaning stream of tasks, joinNext/joinAny/joinAll, and a supervisor loop. - [TaskSet::__construct](https://true-async.github.io/en/docs/reference/task-set/construct.md): Create a new TaskSet with optional concurrency limit. - [TaskSet::awaitCompletion](https://true-async.github.io/en/docs/reference/task-set/await-completion.md): Wait for all tasks in the set to complete. - [TaskSet::cancel](https://true-async.github.io/en/docs/reference/task-set/cancel.md): Cancel all tasks in the set. - [TaskSet::close](https://true-async.github.io/en/docs/reference/task-set/close.md): Close the set for new tasks. - [TaskSet::count](https://true-async.github.io/en/docs/reference/task-set/count.md): Get the number of tasks not yet delivered to the consumer. - [TaskSet::dispose](https://true-async.github.io/en/docs/reference/task-set/dispose.md): Destroy the task set scope. - [TaskSet::finally](https://true-async.github.io/en/docs/reference/task-set/finally.md): Register a completion handler for the set. - [TaskSet::getIterator](https://true-async.github.io/en/docs/reference/task-set/get-iterator.md): Get an iterator for traversing results with automatic cleanup. - [TaskSet::isClosed](https://true-async.github.io/en/docs/reference/task-set/is-closed.md): Check if the set is closed. - [TaskSet::isFinished](https://true-async.github.io/en/docs/reference/task-set/is-finished.md): Check if all tasks in the set are finished. - [TaskSet::joinAll](https://true-async.github.io/en/docs/reference/task-set/join-all.md): Wait for all tasks and get an array of results with automatic set cleanup. - [TaskSet::joinAny](https://true-async.github.io/en/docs/reference/task-set/join-any.md): Get the result of the first successfully completed task with automatic removal from the set. - [TaskSet::joinNext](https://true-async.github.io/en/docs/reference/task-set/join-next.md): Get the result of the first completed task with automatic removal from the set. - [TaskSet::spawn](https://true-async.github.io/en/docs/reference/task-set/spawn.md): Add a task to the set with an auto-increment key. - [TaskSet::spawnWithKey](https://true-async.github.io/en/docs/reference/task-set/spawn-with-key.md): Add a task to the set with an explicit key. - [The Async\Coroutine Class](https://true-async.github.io/en/docs/components/coroutines.md): The Async\Coroutine class -- creation, lifecycle, states, cancellation, debugging and complete method reference. - [The Async\TaskGroup Class](https://true-async.github.io/en/docs/components/task-group.md): Async\TaskGroup -- a high-level structured concurrency pattern for managing groups of tasks. - [The Async\TaskSet Class](https://true-async.github.io/en/docs/components/task-set.md): Async\TaskSet — a dynamic task set with automatic result cleanup after delivery. - [Third-Party Packages](https://true-async.github.io/en/tutors-laravel/05-third-party.md): Debugbar, Telescope, Inertia, spatie/permission, Socialite: what's already adapted for coroutines and what's worth disabling. - [Thread::cancel](https://true-async.github.io/en/docs/reference/thread/cancel.md): Request cancellation of a thread. - [Thread::finally](https://true-async.github.io/en/docs/reference/thread/finally.md): Register a callback on thread completion. - [Thread::getException](https://true-async.github.io/en/docs/reference/thread/get-exception.md): Get the exception with which the thread finished. - [Thread::getResult](https://true-async.github.io/en/docs/reference/thread/get-result.md): Get the result of thread execution. - [Thread::isCancelled](https://true-async.github.io/en/docs/reference/thread/is-cancelled.md): Check whether the thread was cancelled. - [Thread::isCompleted](https://true-async.github.io/en/docs/reference/thread/is-completed.md): Check whether the thread has finished executing. - [Thread::isRunning](https://true-async.github.io/en/docs/reference/thread/is-running.md): Check whether the thread is currently running. - [ThreadChannel::__construct()](https://true-async.github.io/en/docs/reference/thread-channel/__construct.md): Create a new thread-safe channel for exchanging data between OS threads. - [ThreadChannel::capacity](https://true-async.github.io/en/docs/reference/thread-channel/capacity.md): Get the buffer capacity of the thread channel. - [ThreadChannel::close](https://true-async.github.io/en/docs/reference/thread-channel/close.md): Close the thread channel, signalling that no further values will be sent. - [ThreadChannel::count](https://true-async.github.io/en/docs/reference/thread-channel/count.md): Get the number of values currently buffered in the thread channel. - [ThreadChannel::isClosed](https://true-async.github.io/en/docs/reference/thread-channel/is-closed.md): Check whether the thread channel has been closed. - [ThreadChannel::isEmpty](https://true-async.github.io/en/docs/reference/thread-channel/is-empty.md): Check whether the thread channel buffer currently holds no values. - [ThreadChannel::isFull](https://true-async.github.io/en/docs/reference/thread-channel/is-full.md): Check whether the thread channel buffer is filled to its maximum capacity. - [ThreadChannel::recv](https://true-async.github.io/en/docs/reference/thread-channel/recv.md): Receive the next value from the thread channel, blocking the calling thread if no value is available. - [ThreadChannel::send](https://true-async.github.io/en/docs/reference/thread-channel/send.md): Send a value to the thread channel, blocking the calling thread if the channel cannot accept it immediately. - [ThreadPool::__construct()](https://true-async.github.io/en/docs/reference/thread-pool/__construct.md): Create a new ThreadPool with a fixed number of worker threads. - [ThreadPool::cancel()](https://true-async.github.io/en/docs/reference/thread-pool/cancel.md): Hard-stop the thread pool, immediately rejecting all queued tasks. - [ThreadPool::close()](https://true-async.github.io/en/docs/reference/thread-pool/close.md): Gracefully shut down the thread pool, waiting for all queued and running tasks to finish. - [ThreadPool::getCompletedCount()](https://true-async.github.io/en/docs/reference/thread-pool/get-completed-count.md): Get the total number of tasks completed by the thread pool since creation. - [ThreadPool::getPendingCount()](https://true-async.github.io/en/docs/reference/thread-pool/get-pending-count.md): Get the number of tasks waiting in the thread pool queue. - [ThreadPool::getRunningCount()](https://true-async.github.io/en/docs/reference/thread-pool/get-running-count.md): Get the number of tasks currently executing in worker threads. - [ThreadPool::getWorkerCount()](https://true-async.github.io/en/docs/reference/thread-pool/get-worker-count.md): Get the number of worker threads in the thread pool. - [ThreadPool::isClosed()](https://true-async.github.io/en/docs/reference/thread-pool/is-closed.md): Check whether the thread pool has been shut down. - [ThreadPool::map()](https://true-async.github.io/en/docs/reference/thread-pool/map.md): Apply a callable to each array item in parallel using the thread pool. - [ThreadPool::submit()](https://true-async.github.io/en/docs/reference/thread-pool/submit.md): Submit a task to the thread pool and receive a Future for its result. - [Threads](https://true-async.github.io/en/tutors/14-threads.md): spawn_thread and ThreadPool: true parallelism for computation, isolation, and data copying. - [timeout](https://true-async.github.io/en/docs/reference/timeout.md): timeout() — create a timeout object to limit waiting time. - [TrueAsync + FrankenPHP: Many Requests, One Thread](https://true-async.github.io/en/architecture/frankenphp.md): How TrueAsync turns FrankenPHP into a fully asynchronous server -- a coroutine per request, zero-copy responses, dual notification path. - [TrueAsync ABI](https://true-async.github.io/en/architecture/zend-async-api.md): Architecture of the PHP core asynchronous ABI -- function pointers, extension registration, global state, and ZEND_ASYNC_* macros. - [TrueAsync Mobile](https://true-async.github.io/en/docs/mobile.md): native-bridge: a persistent PHP runtime inside a native Android app over JNI. Architecture, event exchange, calling Kotlin from PHP, code generation. - [TrueAsync Server](https://true-async.github.io/en/docs/server.md): TrueAsync Server — a native PHP extension that turns PHP into a high-performance HTTP/1.1/2/3 server. Multi-protocol, TLS 1.2/1.3, compression, coroutines — all in one process. - [TrueAsync Server architecture](https://true-async.github.io/en/architecture/server.md): TrueAsync Server internals: single-threaded event loop, zero-copy, CoDel, bailout firewall, multi-worker via SO_REUSEPORT. - [TrueAsync Server configuration](https://true-async.github.io/en/docs/server/configuration.md): HttpServerConfig: listeners, TLS, timeouts, backpressure, body limits, body streaming, hot reload, WebSocket topics, multi-sink logging, statistics, HTTP/3. - [TrueAsync Server examples](https://true-async.github.io/en/docs/server/examples.md): Ready-made recipes: JSON API, fan-out, multipart upload, static, redirect, SSE, bailout firewall. - [TrueAsync Server exceptions](https://true-async.github.io/en/docs/reference/server/exceptions.md): Server exception hierarchy: HttpServerException and descendants, plus HttpException — a cancellation carrier of an HTTP status. - [TrueAsync Server quick start](https://true-async.github.io/en/docs/server/quickstart.md): Install TrueAsync Server, a minimal Hello World example, and a sanity check. Linux and Windows. - [TrueAsync\HttpRequest](https://true-async.github.io/en/docs/reference/server/http-request.md): TrueAsync\HttpRequest — read-only HTTP request representation: method, URI, headers, body, query, multipart, W3C Trace Context, body streaming. - [TrueAsync\HttpResponse](https://true-async.github.io/en/docs/reference/server/http-response.md): TrueAsync\HttpResponse — status, headers, body, streaming via send()/sendable(), HTTP/2 trailers, sendFile(), json(), html(), redirect(). - [TrueAsync\HttpServer](https://true-async.github.io/en/docs/reference/server/http-server.md): TrueAsync\HttpServer — the main class of the built-in HTTP server. Handler registration, start/stop, telemetry, runtime stats. - [TrueAsync\HttpServerConfig](https://true-async.github.io/en/docs/reference/server/http-server-config.md): Full reference for HttpServerConfig: listeners, workers, TLS, timeouts, backpressure, drain, compression, HTTP/3 knobs, body streaming, logging. - [TrueAsync\LogSeverity](https://true-async.github.io/en/docs/reference/server/log-severity.md): TrueAsync\LogSeverity — enum of server logging levels. Backed by OpenTelemetry SeverityNumber. - [TrueAsync\SendFileOptions](https://true-async.github.io/en/docs/reference/server/send-file-options.md): TrueAsync\SendFileOptions — value object with HttpResponse::sendFile() settings. Disposition, downloadName, ETag, Range, precompressed sidecars, deleteAfterSend. - [TrueAsync\StaticHandler](https://true-async.github.io/en/docs/reference/server/static-handler.md): TrueAsync\StaticHandler — prefix-mount static delivery without a PHP handler. Precompressed sidecars, ETag, Range, dotfile/symlink policies, open-file cache. - [TrueAsync\UploadedFile](https://true-async.github.io/en/docs/reference/server/uploaded-file.md): TrueAsync\UploadedFile — PSR-7-compatible class for uploaded multipart files. moveTo(), getStream(), getSize(), getClientFilename(). - [TrueAsync\WebSocket](https://true-async.github.io/en/docs/reference/server/websocket.md): TrueAsync\WebSocket, WebSocketMessage, WebSocketUpgrade, WebSocketCloseCode, and the WebSocket exception hierarchy. - [Tutorials](https://true-async.github.io/en/tutorial.md): Step-by-step TrueAsync tutorials — from your first coroutine to pools, threads, and Context. - [WebSocket](https://true-async.github.io/en/docs/server/websocket.md): addWebSocketHandler(): full-duplex connections over RFC 6455, cross-worker pub/sub topics, backpressure, keepalive, subprotocol negotiation, permessage-deflate. - [WebSocket](https://true-async.github.io/en/tutors-server/07-websocket.md): WebSocket: the recv loop, a chat room, send from other coroutines, and trySend against slow clients. - [What You Can't Do Inside a Coroutine](https://true-async.github.io/en/tutors-laravel/04-unsafe-patterns.md): Mutable static properties, once() on a singleton, and Number::useLocale(): the usual ways state leaks between requests, and how to catch them with static analysis. - [Why Asynchrony?](https://true-async.github.io/en/docs/components/introduction.md): What is asynchrony and why do you need it? - [Workers and HTTP/3](https://true-async.github.io/en/tutors-server/08-workers.md): setWorkers(): the first series' threads under the server's hood, the bootloader, and HTTP/3 on the same port. - [Your First Server](https://true-async.github.io/en/tutors-server/01-first-server.md): An HTTP server inside PHP: HttpServer, HttpServerConfig, and your first handler. - [Zombie Coroutines: Fault Tolerance](https://true-async.github.io/en/docs/components/zombie-coroutines.md): Zombie coroutines in TrueAsync -- tolerance for third-party code, disposeSafely(), disposeAfterTimeout(), managing non-cancellable tasks.