AsyncWorker: added removeFromThreadStore()

and use it instead of overwriting with null things, which still occupies memory
This commit is contained in:
Dylan K. Taylor
2018-06-07 10:12:50 +01:00
parent ee787974f2
commit b331f8e1c9
3 changed files with 23 additions and 2 deletions

View File

@@ -98,4 +98,13 @@ class AsyncWorker extends Worker{
public function getFromThreadStore(string $identifier){
return self::$store[$identifier] ?? null;
}
/**
* Removes previously-stored mixed data from the worker's thread-local object store.
*
* @param string $identifier
*/
public function removeFromThreadStore(string $identifier) : void{
unset(self::$store[$identifier]);
}
}