symplely/coroutine

View on GitHub
examples/parallel/B.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace Async\examples\parallel;

use Async\examples\parallel\A;
use \parallel\Runtime;

class B
{
  public function executeParallel()
  {
    $task = function ($o) {
      echo $o->getOne();
    };

    $runtime    = new Runtime();
    $runtime->run($task, new A());
    $runtime->close();
  }
}