Files
mercury/java
Paul Bone a92b133e2c Fix a deadlock in the Java worker thread implementation
I noticed this bug when accidentally throwing a Mercury exception containing
some malformed Mercury data (a Java null pointer).  The Java worker thread
tried to report the exception, by calling back into Mercury but this
encountered a null pointer exception itself due to the bad data and failed
to de-register itself from the thread pool.  This caused the thread pool to
mistakingly think that a thread was still alive and it failed to terminate
the program.

The solution is tu ensure that the pool knows the thread has shutdown if any
exception occurs.

This bug isn't likely to occur in practice, throwing exceptions whose
message is null is unusual.

java/runtime/MercuryWorkerThread.java:
    As above.
2016-04-12 14:38:05 +10:00
..