Using a dynamic array python multi-threads
<p>In python, I have a thread to add elements to an array. And I have another thread that uses the first element of that array then deletes it.
The problem is that the second thread is faster than the first one, so I need that it waits for the first one to add other elements and then process instead of going into an error index is out of range.</p>

<p>What is the fastest way?</p>