File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 1818use Inhere \Console \Util \FormatUtil ;
1919use Inhere \Console \Util \Helper ;
2020use Swoole \Coroutine ;
21+ use Swoole \Event ;
2122use Toolkit \PhpUtil \PhpDoc ;
2223
2324/**
@@ -233,11 +234,10 @@ public function run(string $command = '')
233234 */
234235 public function coroutineRun ()
235236 {
236- $ ch = new Coroutine \Channel (1 );
237- $ ok = Coroutine::create (function () use ( $ ch ) {
237+ // $ch = new Coroutine\Channel(1);
238+ $ ok = Coroutine::create (function (){
238239 $ result = $ this ->execute ($ this ->input , $ this ->output );
239- $ ch ->push ($ result );
240- // $this->getApp()->stop($status);
240+ // $ch->push($result);
241241 });
242242
243243 // create co fail:
@@ -250,8 +250,9 @@ public function coroutineRun()
250250 // exec by normal flow
251251 $ result = $ this ->execute ($ this ->input , $ this ->output );
252252 } else { // success: wait coroutine exec.
253- // Event::wait();
254- $ result = $ ch ->pop (10 );
253+ Event::wait ();
254+ $ result = 0 ;
255+ // $result = $ch->pop(10);
255256 }
256257
257258 return $ result ;
You can’t perform that action at this time.
0 commit comments