Assume we have multiple threads and a public List
that is responsible to hold real-time data. We have some thread that is responsible to add data to list object. Another thread is responsible to get data from list object and then remove the items from top.
Question: Is it safe to remove from begin of a List
and simultaneously add data to end of list in separate threads? How List
object is implemented?