while (size == 0) {
lock.unlock();
lock.lock();
}
Why not just
while (size == 0) {
lock.lock();
}
is it because we can’t re-lock a mutex? Or is it because the application may ignore this as the stat is basically the same?