(PECL pthreads >= 2.0.0)
Threaded objects form the basis of pthreads ability to execute user code in parallel; they expose synchronization methods and various useful interfaces.
Threaded objects, most importantly, provide implicit safety for the programmer; all operations on the object scope are safe.
> Threaded objects, most importantly, provide implicit safety for the programmer; all operations on the object scope are safe.
However, this comes with a trade-off: Operations on the instance scope are slower than on plain PHP objects.
Static properties are not affected as they are thread-local.
It's worth mentioning here that, since v2.0.0, 'Stackable' class was an alias for 'Threaded' class but has been removed since.