Please answer these questions before submitting your issue. Thanks!
What did you do? If possible, provide a simple script for reproducing the error.
Currently it doesnt seem to be possible without extra coding to retrieve the parent coroutine ID of a random coroutine. Swooe\Couritine::getPcid() does not accept an argument like getPcid($coroutine_id).
Currently, to solve this problem we wrap each coroutine::create() call so that we can build a tree structure of all currently active coroutines and be able to retrieve to root coroutine ID of the request for example. This is needed if it happens (not really practical) a coroutine started in onRequest (which already is a coroutine) has sub-coroutines and from the sub-coroutine we need to retrieve the cid of the root coroutine (which is the request coroutine).
What did you expect to see?
What did you see instead?
What version of Swoole are you using (show your php --ri swoole)?
Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.display_errors => On => On
swoole.use_shortname => On => On
swoole.unixsock_buffer_size => 8388608 => 8388608
What is your machine environment used (including version of kernel & php & gcc) ?
Please answer these questions before submitting your issue. Thanks!
Currently it doesnt seem to be possible without extra coding to retrieve the parent coroutine ID of a random coroutine. Swooe\Couritine::getPcid() does not accept an argument like getPcid($coroutine_id).
Currently, to solve this problem we wrap each coroutine::create() call so that we can build a tree structure of all currently active coroutines and be able to retrieve to root coroutine ID of the request for example. This is needed if it happens (not really practical) a coroutine started in onRequest (which already is a coroutine) has sub-coroutines and from the sub-coroutine we need to retrieve the cid of the root coroutine (which is the request coroutine).
What did you expect to see?
What did you see instead?
What version of Swoole are you using (show your
php --ri swoole
)?swoole
Swoole => enabled Author => Swoole Team team@swoole.com Version => 4.3.5 Built => Jul 3 2019 10:42:48 coroutine => enabled epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled spinlock => enabled rwlock => enabled http2 => enabled zlib => enabled mutex_timedlock => enabled pthread_barrier => enabled futex => enabled async_redis => enabled
Directive => Local Value => Master Value swoole.enable_coroutine => On => On swoole.display_errors => On => On swoole.use_shortname => On => On swoole.unixsock_buffer_size => 8388608 => 8388608