Return the First Successful Result from Parallel API Calls Under a Global Timeout

Quick Overview

Implement a function that runs several slow, failure-prone backend API calls concurrently and returns the first successful result within a single overall timeout. It tests concurrency primitives, deadline handling, reporting when every call fails, and cleaning up calls that are still in flight, using threads, futures, or async code.

Return the First Successful Result from Parallel API Calls Under a Global Timeout

Company: Apple

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Technical Screen

Overview: Implement a function that runs several slow, failure-prone backend API calls concurrently and returns the first successful result within a single overall timeout. It tests concurrency primitives, deadline handling, reporting when every call fails, and cleaning up calls that are still in flight, using threads, futures, or async code.

Apple logo
Apple
Sep 13, 2026
mediumSoftware EngineerTechnical ScreenSoftware Engineering Fundamentals
8
0
Loading...