-1
What my code does:
import time
def oi():
while True:
print("oi")
time.sleep(1)
oi()
Output (in 2 seconds past):
oi
oi
What I want you to do:
import time
import multiprocessing
def oi():
while True:
print("oi")
time.sleep(1)
quantidadeDeProcessos = 3
multiprocess(quantidadeDeProcessos, oi())
Output (in 2 seconds past):
oi
oi
oi
oi
oi
oi
Is there any way to do that?
Is there any relation of this question to the How to speed up my python program? If yes, would use this to make HTTP calls in parallel?
– Woss
No, I was just wondering if it’s possible to do that
– x8ss