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
class TestRunnable implements Runnable
{
private $id = 0;
public function __construct($id) {
$this->id = $id;
}
public function run()
{
echo "[".$this->id."]\n";
sleep(1);
}
}
new Process(new TestRunnable(1));
and
class TestProcess extends Process
{
private $id = 0;
public function __construct($id) {
$this->id = $id;
}
public function run()
{
echo "[".$this->id."]\n";
sleep(1);
}
}
new TestProcess (1);
The text was updated successfully, but these errors were encountered:
Any different between these two codes:
and
The text was updated successfully, but these errors were encountered: