You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, pthreads makes copies of classes when a new thread is started. This is a problem for numerous reasons:
Static properties may have been modified, and since the default values of static properties are not retained (unless opcache is used), we cannot make clean copies of classes. This forces us to copy objects like Threaded objects and other things which might not be copyable, like resources. Resolved since PHP 8.1
In PHP 8.1, we will need to copy enum classes, which have object constants. This is problematic for the same reason - we can't conveniently copy objects (although we could copy the AST that instantiates them, but again, without opcache, this is typically not retained). Resolved by other means
Static variables of functions may have been modified (same problem as with static properties).
We can avoid all of these issues by copying the class to persistent memory when it is loaded, exactly the same way that OPcache does.
The text was updated successfully, but these errors were encountered:
Alright thanks for updating, just considering the possibitily of having to copy classes causing an extra delay in Pool::Submit , which seems to be aligned with the #63 issue disappearing when opcache cli is enabled .
Currently, pthreads makes copies of classes when a new thread is started. This is a problem for numerous reasons:
Static properties may have been modified, and since the default values of static properties are not retained (unless opcache is used), we cannot make clean copies of classes. This forces us to copy objects like Threaded objects and other things which might not be copyable, like resources.Resolved since PHP 8.1In PHP 8.1, we will need to copy enum classes, which have object constants. This is problematic for the same reason - we can't conveniently copy objects (although we could copy the AST that instantiates them, but again, without opcache, this is typically not retained).Resolved by other meansWe can avoid all of these issues by copying the class to persistent memory when it is loaded, exactly the same way that OPcache does.
The text was updated successfully, but these errors were encountered: