Created
July 19, 2019 06:10
-
-
Save 1f0/25b68ce7b9a15da2175b116674739378 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import threading | |
import time | |
def test(x): | |
def task(): | |
while 1: | |
print(x) | |
time.sleep(x) | |
y = threading.Thread(target=task) | |
y.start() | |
return y | |
t = test(3) | |
t2 = test(2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment