Skip to content

Commit

Permalink
=add param cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
郭庆哲 committed Aug 13, 2018
1 parent 33f1916 commit f0ef641
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Async.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,18 @@ public static function discard()
* Input you want to execute the required parameters in function
* </p>
* @param string $phpBin You can specify the PHP path for asynchronous execution scripts.
* @param $cwd where to exec script
* @param array $envs
* @return $this
*/
public function start($scriptname, $args = [], $phpBin = null, $envs = [])
public function start($scriptname, $args = [], $cwd = null, $phpBin = null, $envs = [])
{
if ($scriptname == 'callbackStub.php') {
$cwd = __DIR__;
} else {
$cwd = '.';
if ($cwd === null) {
$cwd = '.';
}
if (!is_file($scriptname)) {
throw new FileNotFoundException($scriptname." is not found");
}
Expand Down Expand Up @@ -171,7 +174,5 @@ public function regCallback(callable $callback)
}

// todo add multi async execution like add()->add()->start();


}

0 comments on commit f0ef641

Please sign in to comment.