boundary/scalang — pull request #26 by rnewson (2012-11-06 14:08:40+00:00)
Title: Fix monitoring

This set of patches closes all known race conditions preventing the sending of monitor exit messages for running processes and correctly sends monitor exit messages when an attempt is made to monitor a process that does not exist.

I have run 10,000 handleCall queries, each of which does 'throw new Exception("oops")'. Without these changes, I would receive almost none of the expected monitor exit messages. With them, I received all 10,000. The final commit, that adds synchronize blocks to ensure we don't add a monitor to the monitors variable if we have already exited (and sends a monitor exit instead) fixed the last 4 out of 10,000 message failures.