News for hackers. Stuff that matters.
Re:The easy way to concurrency and parallelism with Python s... by throwaway46281 on Thursday September 14, 2023 @09:21AM (#37508660)
As a side note, using a future as a map key struck be as a bit weird, though perfectly valid. It'd be more natural IMO to use a list for the futures, and have the fetch_url function return a (url, result) tuple. Or use the url as the map key and just iterate over the map items instead of using as_completed on the keys

There are no comments on this comment yet.