Metrics
0
Watch 283 Star 1.1K Fork 254

GVPswoole / swoole-srcCApache-2.0

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

Open
BOYGGBOY  Created at

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

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

total 2 participants

Comments (1)

swoole 2018-09-05 11:31 owner

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

Sign in and comment

Assignee
Labels
Not set
Project
Milestone
Branch
Scheduled start
Not set
Scheduled end
Not set
Top level
Priority

Help Search

183227_9af5e6a8_1826025 111910_4d91f001_1826025