mini\Async\AsyncInterface abstract interface

Documentation

Event loop integration interface for async runtimes

Async runtimes (phasync, Swoole, ReactPHP, etc.) implement this interface to integrate with Mini's fiber-aware architecture. Mini does not provide a default implementation - this is an integration point only.

All methods are designed to "just work" regardless of whether an event loop is already running. Implementations should handle bootstrapping internally when needed.

Methods (7)

Convenience method: spawn a fiber and wait for its result

Spawn a new coroutine (fiber)

Wait for a fiber to complete and return its result

Suspend execution for a duration

Suspend until a stream becomes ready for I/O

Schedule a callback to run after current execution completes

Handle an exception from async code

Source

src/Async/AsyncInterface.php:20-91