RosettaCodeData/Task/Concurrent-computing/Python/concurrent-computing-3.py

10 lines
243 B
Python

import threading
import random
def echo(text):
print(text)
threading.Timer(random.random(), echo, ("Enjoy",)).start()
threading.Timer(random.random(), echo, ("Rosetta",)).start()
threading.Timer(random.random(), echo, ("Code",)).start()