Threaded::from
Creation
&reftitle.description;
public ThreadedThreaded::from
Closurerun
Closureconstruct
arrayargs
Creates an anonymous Threaded object from closures
&reftitle.parameters;
run
The closure to use for ::run
construct
The constructor to use for anonymous object
args
The arguments to pass to constructor
&reftitle.returnvalues;
A new anonymous Threaded object
&reftitle.examples;
Thread safe objects from closures
submit(Collectable::from(function(){
echo "Hello World";
$this->setGarbage();
}));
/* ... */
$pool->shutdown();
?>
]]>
&example.outputs;