2021-09-02 19:37:05 +08:00

16 lines
203 B
Python

import _thread
from queue import Queue
q = Queue(20)
def get():
while True:
msg = q.get()
print("msg = {}".format(msg))
_thread.start_new_thread(get, ())
q.put("this is a msg")