325 Star 1.6K Fork 345

GVPswoole / swoole-src

 / 详情

task进程里的定时器被推迟执行

待办的
创建于  
2018-08-31 09:50

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a recipe for reproducing the error.

在单task中投递3次swoole_timer_after定时器,执行顺序,(1)执行15秒,(2)执行2秒,(3)当2秒定时器执行后,在投递一次2秒的定时器

  1. What did you expect to see?

第三次定时器,在2秒的时候被执行

  1. What did you see instead?

第三次的定时器,没有在2秒的时候执行,而是根据15秒的定时器剩余多少时间执行被推迟

  1. What version of Swoole are you using (php --ri swoole)?

4.0.2

  1. What is your machine environment used (including version of kernel & php & gcc) ?

Linux version 2.6.32-696.6.3.el6.x86_64 (mockbuild@c1bl.rdu2.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC) )

PHP 7.1.18 (cli) (built: Jun 2 2018 07:10:30) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies

  1. If you are using ssl, what is your openssl version?

N/A

输入图片说明
输入图片说明

评论 (1)

BOYGGBOY 创建了任务

请提供一个完整可重现的 demo,定时器推迟可能是你的逻辑代码中存在阻塞IO

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(2)
C
1
https://gitee.com/swoole/swoole.git
git@gitee.com:swoole/swoole.git
swoole
swoole
swoole-src

搜索帮助