@Nonnull
    default Promise<Void> thenRun(@Nonnull ThreadContext context, @Nonnull Runnable action) {
        switch (context) {
            case SYNC:
                return thenRunSync(action);
            case ASYNC:
                return thenRunAsync(action);
            default:
                throw new AssertionError();
        }
    }
Returns a new Promise that, when this promise completes normally, executes
the given task.

@param context the type of executor to use to supply the promise
@param action the action to run before completing the returned future
@return the new promise
helper/src/main/java/me/lucko/helper/promise/Promise.java