Practice ยท 1 of 1
Resilient concurrent gather
Implement gather(urls, fetch, workers=4) using a ThreadPoolExecutor:
- run fetch(url) for every url with up to workers concurrent tasks
- return a tuple (results, errors)
- results maps url โ fetch result for successful calls
- errors maps url โ the exception's string message for failed calls
- one failing url must never prevent others from completing
Difficulty: advanced
Press Submit to check your solution.
Back to lesson: Practice: Executor Practice