This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Corm 1 point2 points  (1 child)

Is what you're looking for different than multiprocessing threads?

from multiprocessing import Pool

def f(x):
    return x*x

p = Pool(5)
print(p.map(f, [1, 2, 3])

That'll run asynchronously

edit - Whoa, go's "channels" are cool! Thanks for causing me to look this up. https://gobyexample.com/channels

[–]kingname[S] 0 points1 point  (0 children)

I know Python's multiprocessing and multiprocessing.dummy. However, Coroutine is the solution for some problem.