study
study copied to clipboard
手把手教你写PHP协程扩展(teach you to write php coroutine extension by hand)
**问题描述** 协程创建传入的闭包op_array分配在closures object成员属性,当yield后会被以参数释减少引用计数, resume后closures object已被释放,将高概率性触发core dumped。 协程execute_data分配阶段应该手动对closures增加一次引用计数 **以下是错误bt** `Starting program: /usr/local/php7.3/bin/php -dextension=/usr/local/php7.3/lib/php/extensions/debug-non-zts-20180731/study.so -f /vagrant/www/tests/coroutine/bug.php [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". int(0) int(1) int(0) int(1) string(9) "cid_a_end"...
一年多没更新了,是不维护了吗?