Back to problems

Concurrent File Downloader with Request Coalescing

Algorithm · Uber · Hard

Coalesced Concurrent File Download Medium · Topics · Company Tags · Hints Implement a thread-safe class CoalescedDownloader that allows multiple threads to fetch files by URL. You are given an underlying function download_file(url) that performs the real download and returns the file content. Your task is to provide a method fetch(url) that returns the content for a URL, adhering to these rules: Requests for different URLs that arrive concurrently must execute in parallel…

Checking your access…