class LightThreadExecutor implements Executor {

    private final HttpServerExchange exchange;

    public LightThreadExecutor(final HttpServerExchange exchange) {
        this.exchange = exchange;
    }

    /**
     * Updates thread MDC based on handler context map.
     * We do not want to clear context beforehand because undertow might set context via worker thread (or io thread) beforehand.
     */
    private void updateExchangeContext() {<FILL_FUNCTION_BODY>}

    @Override
    public void execute(Runnable command) {
        this.updateExchangeContext();
        command.run();
    }
}

        var context = this.exchange.getAttachment(AttachmentConstants.MDC_CONTEXT);

        if (context != null)
            for (var entry : context.entrySet())
                MDC.put(entry.getKey(), entry.getValue());
    
<no_super_class>