Skip to content

Commit bd09a76

Browse files
authored
Update System.php
1 parent 0940b18 commit bd09a76

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/vennv/vapm/System.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,8 @@ public static function init(): void
154154
{
155155
if (!self::$hasInit) {
156156
self::$hasInit = true;
157-
register_shutdown_function(function () {
158-
self::runSingleEventLoop();
159-
});
157+
register_shutdown_function(fn() => self::runSingleEventLoop());
158+
register_tick_function(fn() => self::runEventLoop());
160159
}
161160

162161
parent::init();
@@ -290,4 +289,4 @@ public static function timeEnd(string $name = 'Console'): void
290289
unset(self::$timings[$name]);
291290
}
292291

293-
}
292+
}

0 commit comments

Comments
 (0)