Answers for "thread.threading python"

4

python threading

def myFunction(x, y):
  pass

x = threading.Thread(target=myFunction, args=(x, y))
x.start()
Posted by: Guest on January-20-2021
2

how to thread python

import threading, time

def worker():
    """thread worker function"""
    print('Worker')
    return

threads = []
for i in range(5):
    t = threading.Thread(target=worker)
    threads.append(t)
    t.start()
    print('Thread')
Posted by: Guest on March-07-2020

Python Answers by Framework

Browse Popular Code Answers by Language