I have bytearray object, two threads are accessing it, a producer and consumer.
The producer writes to the bytearray: barr.extend(data)
The consumer reads from the bytearray: barr.find(...)
, barr[x:y]
The producer adds alot of data to the bytearray so I want to free up memory occasionally by del barr[:last_read_pos]
Is this operation thread safe?
Thanks.