Inheritance: extends Threaded, implements pthreads\IPromisable
Ejemplo n.º 1
0
 public function onError(Promisable $promised)
 {
     printf("Oh noes: %s\n", (string) $promised->getError());
 }
Ejemplo n.º 2
0
 public function onFulfilled(Promisable $promised)
 {
     $promised->getLogger()->log("%s: %s\n", $promised->getName(), $promised->getDescription());
     /* allow the object to be collected */
     $promised->setGarbage(true);
 }