osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Python threading and sharing variables


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