(no title)
ddustin | 10 years ago
vector<condition_variable_any*> waiters;
Can realloc at any moment, making the following code unsafe: vector<condition_variable_any*>::iterator it;
for (it = m_array[index].waiters.begin();
it != m_array[index].waiters.end();
++it) {
(*it)->notify_one();
}
If a realloc occurs between the calls to begin() and end() than the loop can become infinite.
No comments yet.