MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / external_thread

Function external_thread

DemoPrograms/Demo_Multithreaded_DataPump.py:59–73  ·  view source on GitHub ↗

Represents some external source of data. You would not include this code as a starting point with this Demo Program. Your data is assumed to come from somewhere else. The important part is that you add data to the thread_queue :param thread_queue: :return:

(thread_queue:queue.Queue)

Source from the content-addressed store, hash-verified

57#
58
59def external_thread(thread_queue:queue.Queue):
60 """
61 Represents some external source of data.
62 You would not include this code as a starting point with this Demo Program. Your data is assumed to
63 come from somewhere else. The important part is that you add data to the thread_queue
64 :param thread_queue:
65 :return:
66 """
67 i = 0
68 while True:
69 time.sleep(.01)
70 point = (random.randint(0,gsize[0]), random.randint(0,gsize[1]))
71 radius = random.randint(10, 40)
72 thread_queue.put((point, radius))
73 i += 1
74
75
76# M""""""""M dP dP MM""""""""`M

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected