@Nonnull
	public CompletableFuture<DecompileResult> decompile(@Nonnull JvmDecompiler decompiler, @Nonnull Workspace workspace, @Nonnull JvmClassInfo classInfo) {
		return CompletableFuture.supplyAsync(() -> {
			boolean doCache = config.getCacheDecompilations().getValue();
			if (doCache) {
				// Check for cached result, returning the cached result if found
				// and only if the current config matches the one that yielded the cached result.
				DecompileResult cachedResult = CachedDecompileProperty.get(classInfo, decompiler);
				if (cachedResult != null) {
					if (cachedResult.getConfigHash() == decompiler.getConfig().getHash())
						return cachedResult;

					// Config changed, void the cache.
					CachedDecompileProperty.remove(classInfo);
				}
			}

			// We will use the layered filter manually here so any user requested cleanup is done before we pass the class to the decompiler.
			// The decompiler base implementation skips some work if there are no registered filters so doing it externally like this is
			// better for performance. If the user has no filtering enabled then no re-reads and re-writes are necessary.
			JvmClassInfo filteredClass = JvmBytecodeFilter.applyFilters(workspace, classInfo, Collections.singletonList(layeredJvmFilter));

			// Decompile and cache the results.
			DecompileResult result = decompiler.decompile(workspace, filteredClass);
			String decompilation = result.getText();
			if (decompilation != null && !outputTextFilters.isEmpty()) {
				// Apply output filters and re-wrap the result with the new output text.
				for (OutputTextFilter textFilter : outputTextFilters)
					decompilation = textFilter.filter(workspace, classInfo, decompilation);
				result = new DecompileResult(decompilation, result.getConfigHash());
			}
			if (doCache)
				CachedDecompileProperty.set(classInfo, decompiler, result);
			return result;
		}, decompileThreadPool);
	}
Uses the built-in thread-pool to schedule the decompilation.

@param decompiler
		Decompiler implementation to use.
@param workspace
		Workspace to pull additional information from.
@param classInfo
		Class to decompile.

@return Future of decompilation result.
recaf-core/src/main/java/software/coley/recaf/services/decompile/DecompilerManager.java