Amp\Parallel\Sync\ThreadedParcel class ThreadedParcel implements Amp\Parallel\Sync\Parcel

A thread-safe container that shares a value between multiple threads.

Summary

Properties

Methods

Properties

Methods

__construct — public function __construct(mixed $value)

Creates a new shared object container.

Type Parameter Description Default Value
mixed $value The value to store in the container. none
unwrap — public function unwrap(): Amp\Promise
No documentation.
synchronized — public function synchronized(callable $callback): Amp\Promise
No documentation.
Type Parameter Description Default Value
callable $callback No documentation. none