Lines Matching defs:hook
42 Shutdown.add(1 /* shutdown hook invocation order */,
61 /* Add a new shutdown hook. Checks the shutdown state and the hook itself,
64 static synchronized void add(Thread hook) {
68 if (hook.isAlive())
71 if (hooks.containsKey(hook))
74 hooks.put(hook, hook);
77 /* Remove a previously-registered hook. Like the add method, this method
80 static synchronized boolean remove(Thread hook) {
84 if (hook == null)
87 return hooks.remove(hook) != null;
101 for (Thread hook : threads) {
102 hook.start();
104 for (Thread hook : threads) {
107 hook.join();