Lines Matching defs:hook
50 // (0) Console restore hook
52 // (2) DeleteOnExit hook
56 // the index of the currently running shutdown hook to the hooks array
75 * Add a new shutdown hook. Checks the shutdown state and the hook itself,
83 * @params slot the slot in the shutdown hook array, whose element
85 * @params registerShutdownInProgress true to allow the hook
87 * @params hook the hook to be registered
94 static void add(int slot, boolean registerShutdownInProgress, Runnable hook) {
97 throw new InternalError("Shutdown hook at slot " + slot + " already registered");
107 hooks[slot] = hook;
116 Runnable hook;
118 // acquire the lock to make sure the hook registered during
121 hook = hooks[i];
123 if (hook != null) hook.run();