I just came to realize:
ReentrantMonitorAutoEnter lock1(...);
ReentrantMonitorAutoEnter lock2(...);
{
ReentrantMonitorAutoExit unlock1(...);
// This will not release the monitor.
{
ReentrantMonitorAutoExit unlock2(...);
// This will release the monitor.
}
}
Sometimes it is not clear how many ReentrantMonitorAutoExits are required to
effectively release the monitor.
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform