private void stop() {
			// Calling 'close()' on the service will make the loop on the service event 'take()' break.
			if (watchService != null) {
				try {
					logger.debug("Stopping script directory watch task");
					watchService.close();
				} catch (IOException ex) {
					logger.error("Failed to stop script directory watch service");
				}
				watchFuture.cancel(true);
				watchService = null;
			}
		}
Wrapper to manage threaded watch service on the script directory.
recaf-core/src/main/java/software/coley/recaf/services/script/ScriptManager.java