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)
| 57 | # |
| 58 | |
| 59 | def 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 |