Amp\Parallel\Sync\Parcel interfaceParcel

A parcel object for sharing data across execution contexts.

A parcel is an object that stores a value in a safe way that can be shared between different threads or processes. Different handles to the same parcel will access the same data, and a parcel handle itself is serializable and can be transported to other execution contexts.

Wrapping and unwrapping values in the parcel are not atomic. To prevent race conditions and guarantee safety, you should use the provided synchronization methods to acquire a lock for exclusive access to the parcel first before accessing the contained value.





synchronized —public functionsynchronized(callable$callback):Amp\Promise
No documentation.
Type Parameter Description Default Value
callable $callback No documentation. none
unwrap —public functionunwrap():Amp\Promise
No documentation.