M
M
Max Payne2016-05-31 22:52:24
Python
Max Payne, 2016-05-31 22:52:24

python multithreading?

I have a function that sends an Http request. I need to call this function several times with different arguments so that all these three threads work at the same time. How can this be implemented?
tried it with _thread as well - doesn't work

try:
    Thread(target=f, args=(list1,)).start()
    Thread(target=f, args=(list2,)).start()
except:
   print("Error: unable to start thread")

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2016-05-31
@YardalGedal

toly.github.io/blog/2014/02/13/parallelism-in-one-line
and in general - look at MultyCurl in pycurl

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question