Yeah I've always been pretty appalled that this exists. We should remove it
if at all possible.

bholley


On Nov 24, 2017 04:45, <[email protected]> wrote:

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
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to