I tried with 2 and 4 also just to be clear.
-
-
Replying to @o_guest
I've just seen your code. Not sure if it might be due to apply_async? I usually do this: https://pastebin.com/uJVvpYqv
1 reply 0 retweets 1 like -
Replying to @draxus
I'll try your way. But like
@seaandsailor was saying it could be that I'm not doing enough on each worker? Turbo thanks for code I'll try.
1 reply 0 retweets 1 like -
OK, so I don't actually understand your way, sorry. You have to bear in mind I used multiprocessing for the first time yesterday.
1 reply 0 retweets 0 likes -
for example where you define your arguments why are you using itertools.product?
1 reply 0 retweets 0 likes -
does that mean I have to use itertools.combinations? my loop is outside all this... hmm...
2 replies 0 retweets 0 likes -
Replying to @o_guest @seaandsailor
my point is that you don't need to use the loop. I use itertools because I want all combinations of lists A and B.
1 reply 0 retweets 1 like -
map will take care of splitting your array of arguments and combine the results for you.
1 reply 0 retweets 1 like -
-
sorry I don't get how to use combinations to get what I want into a single array — and then the function has to accept the whole array?
2 replies 0 retweets 0 likes
unless I'm mistaken if I compute the array of combinations it'll take ages to get the value of arguments before getting to parallelisation.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.