From 2415e24045bb5f51f1054d9cd099fc95963de2fb Mon Sep 17 00:00:00 2001 From: as2252258 Date: Fri, 29 Apr 2022 16:57:39 +0800 Subject: [PATCH] modify mysql result --- Inotify.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Inotify.php b/Inotify.php index c5546e9..211baff 100644 --- a/Inotify.php +++ b/Inotify.php @@ -100,14 +100,14 @@ class Inotify extends BaseProcess } Event::add($this->inotify, [$this, 'check']); Event::cycle([$this, 'clear']); - Event::wait(); - } + while (true) { + if ($this->isStop()) { + Event::del($this->inotify); + break; + } + Event::dispatch(); - - public function clear() - { - if ($this->isStop()) { - Event::del($this->inotify); + usleep(100 * 1000); } }