setMinimumRuntime(20); $promise = new Signal(\SIGUSR1, \SIGUSR2); Loop::delay(10, fn() => \posix_kill(\getmypid(), \SIGUSR1)); $this->assertSame(\SIGUSR1, await($promise)); $promise = new Signal(\SIGUSR1, \SIGUSR2); Loop::delay(10, fn() => \posix_kill(\getmypid(), \SIGUSR2)); $this->assertSame(\SIGUSR2, await($promise)); } public function testReference(): void { $this->setMinimumRuntime(10); Loop::delay(10, fn() => \posix_kill(\getmypid(), \SIGUSR1)); $promise = new Signal(\SIGUSR1, \SIGUSR2); $promise->unreference(); $promise->reference(); await($promise); } }