src/main/java/net/robinfriedli/aiode/concurrent/ThreadContext.java
public ThreadContext fork() {
        Map<String, Object> inheritedContexts = installedContexts
            .entrySet()
            .stream()
            .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));

        return new ThreadContext(inheritedContexts);
    }
/**
     * @return a new ThreadContext based on this one with the same content, invoking {@link ForkableThreadContext#fork()}
     * for each installed Context that implements that interface. The new ThreadContext will receive a copy of the map
     * of installed contexts of the this ThreadContext as inheritedContexts. Once the new ThreadContext is installed via
     * {@link ThreadContext.Current#installExplicitly(ThreadContext)} the inherited contexts are installed on the new
     * ThreadContext and {@link ForkableThreadContext#fork()} is called for each applicable context.
     * To be used in forked tasks.
     */
@return a new ThreadContext based on this one with the same content, invoking  ForkableThreadContext#fork()
for each installed Context that implements that interface. The new ThreadContext will receive a copy of the map
of installed contexts of the this ThreadContext as inheritedContexts. Once the new ThreadContext is installed via
ThreadContext.Current#installExplicitly(ThreadContext) the inherited contexts are installed on the new
ThreadContext and  ForkableThreadContext#fork() is called for each applicable context.
To be used in forked tasks.
@return a new ThreadContext based on this one with the same content invoking ForkableThreadContext#fork () for each installed Context that implements that interface . The new ThreadContext will receive a copy of the map of installed contexts of the this ThreadContext as inheritedContexts . Once the new ThreadContext is installed via ThreadContext . Current#installExplicitly ( ThreadContext ) the inherited contexts are installed on the new ThreadContext and ForkableThreadContext#fork () is called for each applicable context . To be used in forked tasks .
public ThreadContext fork() {
        Map<String, Object> inheritedContexts = installedContexts
            .entrySet()
            .stream()
            .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
        return new ThreadContext(inheritedContexts);
    }
public ThreadContext fork ( ) { Map < String , Object > inheritedContexts = installedContexts . entrySet ( ) . stream ( ) . collect ( Collectors . toMap ( Map . Entry :: getKey , Map . Entry :: getValue ) ) ; return new ThreadContext ( inheritedContexts ) ; }
@return a new ThreadContext based on this one with the same content, invoking {@link ForkableThreadContext#fork()}
 for each installed Context that implements that interface.
@return a new ThreadContext based on this one with the same content invoking { @link ForkableThreadContext#fork () } for each installed Context that implements that interface .