Hey, I wonder how lists work between threads. For example I want to have a list like std::list<int> numbers
And then on one thread I would have a while loop
while(true)
{
if(numbers.size() > 0)
{
std::cout << list[0];
list.pop_front();
}
and then from other threads I would like to add something to that list one in a while, in random moments.
Will that work? Or should I use something else than list?