mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-17 02:13:54 +00:00
[java] Make changes following Julien's review of my recent patch
java/runtime/JavaInternal.java:
java/runtime/MercuryRuntime.java:
java/runtime/MercuryThreadPool.java:
samples/java_interface/standalone_java/JavaMain.java:
samples/java_interface/standalone_java/Makefile:
samples/java_interface/standalone_java/mercury_lib.m:
As above.
This commit is contained in:
@@ -25,14 +25,17 @@ public class JavaMain {
|
||||
try {
|
||||
runProgram(args);
|
||||
} finally {
|
||||
// When we have finished calling Mercury procedures then we need to
|
||||
// tell the Mercury Runtime that we've finished using it.
|
||||
// This invokes any finalisers specified using ':- finalise'
|
||||
// declarations in the set of Mercury libraries we are using. It
|
||||
// also tells the thread pool to shutdown, if the thread pool is not
|
||||
// runnuing then this does nothing.
|
||||
// When we have finished calling Mercury procedures then we need
|
||||
// to tell the Mercury Runtime that we've finished using it.
|
||||
// The static method finalise() in the MercuryRuntime class does
|
||||
// this.
|
||||
// this. This call is (currently) mandatory otherwise the JVM
|
||||
// may not exit cleanly, therefore it should be called in a
|
||||
// finally block as in this example.
|
||||
//`
|
||||
// This call will invoke any finalisers specified using
|
||||
// ':- finalise' declarations in the set of Mercury libraries we
|
||||
// are using. It also tells the thread pool to shutdown, if the
|
||||
// thread pool is not runnuing then this does nothing.
|
||||
//
|
||||
MercuryRuntime.finalise();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user