I have code like this:
arr = [Queue() for _ in range(10)]
And some threads will use the list at the same time. such as arr[0].get()
. I'm curious whether it is threadsafe. I know Queue()
is threadsafe in python. However, I do not know whether [Queue()]
is threadsafe.