// wake up threads waiting on this instance's monitor (e.g. workspace janitor)
notifyAll();
// Shut down the executor service
ScheduledExecutorService executor = context.getExecutor();
executor.shutdown();
try {
// Wait for all remaining background threads to terminate
if (!executor.awaitTermination(10, TimeUnit.SECONDS)) {
log.warn("Attempting to forcibly shutdown runaway threads");
executor.shutdownNow();