Python Forum
Problem with concurrent.futures.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with concurrent.futures.
#4
(Sep-01-2021, 04:49 PM)thunderspeed Wrote: I'm using the following:
This is not enough info.
Just [input] in the map argument what do think this will do?

If i should use map() in my code it could be done line this.
if __name__ == '__main__':
    with concurrent.futures.ProcessPoolExecutor(max_workers=10) as executor:   
        executor.map(image_down, [f'http://xkcd.com/{numb}/' for numb in range(1,200)])
So now use list comprehension to make a list with url's.
I preferer submit() in first code.
thunderspeed likes this post
Reply


Messages In This Thread
Problem with concurrent.futures. - by thunderspeed - Sep-01-2021, 04:32 PM
RE: Problem with concurrent.futures. - by snippsat - Sep-01-2021, 04:45 PM
RE: Problem with concurrent.futures. - by snippsat - Sep-01-2021, 05:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Concurrent futures threading running at same speed as non-threading billykid999 13 1,868 May-03-2023, 08:22 AM
Last Post: billykid999
  Class variables and Multiprocessing(or concurrent.futures.ProcessPoolExecutor) Tomli 5 3,904 Nov-12-2021, 09:55 PM
Last Post: snippsat
  concurrent.futures help samuelbachorik 2 1,759 Aug-22-2021, 07:20 AM
Last Post: bowlofred
  Trying to understand concurrent.futures.ThreadPoolExecutor Laxminarsaiah 0 1,630 Dec-18-2019, 12:43 PM
Last Post: Laxminarsaiah
  asyncio: run_until_complete() returns when the first of gathered Futures is set saavedra29 0 3,960 Dec-23-2017, 10:24 PM
Last Post: saavedra29
  Need my program to run concurrent operations cygnus_X1 1 3,147 Jul-21-2017, 10:49 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020