Python threading and sharing variables

Thomas Nyberg tomuxiong at gmx.com
Wed Jul 5 04:28:53 EDT 2017


On 07/05/2017 10:20 AM, Thomas Nyberg wrote:
>  [...snip...]

Btw I forgot to mention that you'd probably want to use q.get_nowait()
instead of q.get() in my code example if you don't want the main thread
to block (which what I think you want to avoid from your code example).

	https://docs.python.org/3.7/library/queue.html#queue.Queue.get_nowait

Cheers,
Thomas



More information about the Python-list mailing list