Python Tutorial - how to use concurrent futures in python to run multiple functions at the same time

preview_player
Показать описание
Python Tutorial - how to use concurrent futures in python to run multiple functions at the same time. This is part 2 of using multiprocessing using python, this tutorial will explain the more recent method of how two functions can be ran at the same time.

I would like to thank all of you, for the support that you have showed me in all my recent videos. I am very grateful for it. If you guys have any ideas for future videos make sure to post them in the community tab under my post "ideas for next videos". And as always guys I will see your beautiful faces in the next tutorial.

Join the discord channel to have some fun:

Follow me on instagram:

*** Music Credits ***

Checkout my setup!!!

Рекомендации по теме
Комментарии
Автор

Why FInished in time is printed so many times?

davidaliaga
Автор

How do you make it stop running the rest of the script until the futures are done running?

elifebres
Автор

Thanks Johan. I want to ask why you placed the 'if __name__=="__main__" ' statement within the context manager and not the other way. I can see there plenty "finished in time :" lines printed in the video. Meanwhile, I tried it the other way by placing the 'if __name__=="__main__" ' statement above and outside the context manager, I got expected result, less print outputs. Is there any particular reason you did it that way?

judeleon
Автор

Thank you for your great video, !! I'd like to see a tuto of futures trading python of crossing two ema with taking profit targets . I 'm really stucked with functions and logics of taking profits with futures . I made a lot of research in the net but i didn't find much information . Please if possible explain it in a tutorial for your future videos . Thank you master

soskokojsj
Автор

some one explain me how i can stop a program in running time like we say alexa what news today the she say first news, 2 news, 3 news but at time program is live running then we say stop program program is stop how ? plss explain

klawpaw
Автор

Great video! Although your link to the code doesn’t work anymore.

immortalsun
Автор

def test(num):
time.sleep(num)
return "hello"

start = time.time()

with as executor:
if __name__ == "__main__":
f1 = executor.submit(test, 1)
f2 = executor.submit(test, 1)

print(time.time() - start)

This is the code I used it's taking a little bit more than 14 seconds to execute where as on the cpu it took 2 second. Can you please help me and point out the mistake if there any ?

devavratsinghbisht
Автор

Is there a way to pass in multiple arguments to that submit function call?

Oopsiedaisy
Автор

how to run multiple selenium driver python script one by one in python

SatishKumar-tgbg
Автор

The photo of your pc
Photo in tamr Tg channel

mohmedside