Пример #1
0
 /**
  * Static method to create your threads from functions ...
  **/
 public static function call($method, $params)
 {
     $thread = new Async($method, $params);
     if ($thread->start()) {
         return $thread;
     }
     /** else throw Nastyness **/
 }
Пример #2
0
 public static function call($method, $params = array())
 {
     $thread = new Async($method, $params);
     if ($thread->start()) {
         return $thread;
     }
 }
Пример #3
0
<?php

class Async extends Thread
{
    public function __construct()
    {
    }
    public function run()
    {
    }
}
$t = new Async();
var_dump($t->start());