public static function race($value) { (yield Co::RETURN_WITH => (yield ControlUtils::anyOrRace($value, ['\\mpyw\\Co\\Internal\\ControlUtils', 'fail'], 'Co::race() failed.'))); // @codeCoverageIgnoreStart }
public function testRaceEmpty() { try { Co::wait(Co::race(['A', 'B'])); $this->assertTrue(false); } catch (AllFailedException $e) { $this->assertEquals('Co::race() failed.', $e->getMessage()); $this->assertEquals(['A', 'B'], $e->getReasons()); } }