code: public static Executor currentContextExecutor(final Executor e) {
      final class CurrentContextExecutor implements Executor {
        @Override
        public void execute(Runnable r) {
          e.execute(Context.current().wrap(r));
        }
      }
  
      return new CurrentContextExecutor();
    }
docs: Create an executor that propagates the {@link #current} context when {@link Executor#execute}
  is called as the {@link #current} context of the {@code Runnable} scheduled. <em>Note that this
  is a static method.</em>
  
  @see #fixedContextExecutor(Executor)