Class ForkingExecutor

java.lang.Object
com.spotify.fmt.ForkingExecutor
All Implemented Interfaces:
Closeable, AutoCloseable

class ForkingExecutor extends Object implements Closeable
An executor that executes a method in a sub-process JVM.

The function, its result and any thrown exception must be serializable as serialization is used to transport these between the processes.

Adapted from https://github.com/spotify/flo/blob/91d2e546bc8fa8e6fee9bc8c6dd484d87db3b0af/flo-runner/src/main/java/com/spotify/flo/context/ForkingExecutor.java