protected function awaitFirstResult(Context $context, array $tasks, CancellationHandler $cancel, array & $errors): \Generator
    {
        if (empty($tasks)) {
            return;
        }
        
        try {
            $result = yield $context->first($tasks, $cancel, $errors);
        } catch (MultiReasonException $e) {
            $result = null;
        }
        
        return $result;
    }