Package org.sosy_lab.java_smt.basicimpl
Class ShutdownHook
java.lang.Object
org.sosy_lab.java_smt.basicimpl.ShutdownHook
- All Implemented Interfaces:
AutoCloseable,ShutdownNotifier.ShutdownRequestListener
public final class ShutdownHook
extends Object
implements ShutdownNotifier.ShutdownRequestListener, AutoCloseable
A utility class for interrupting a parallel running solver thread.
The hook is active directly after its construction until calling the method close() and forwards all shutdown requests to the provided method.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidshutdownRequested(@Nullable String reasonUnused)
-
Constructor Details
-
ShutdownHook
-
-
Method Details
-
shutdownRequested
- Specified by:
shutdownRequestedin interfaceShutdownNotifier.ShutdownRequestListener
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-