public void run() {
        try {
            threadState.bind();
            doRun(this.runnable);
        } finally {
            threadState.restore();
        }
    }
{@link ThreadState#bind Bind}s the Subject thread state, executes the target {@code Runnable} and then guarantees
the previous thread state's {@link ThreadState#restore restoration}:
<pre>
try {
    threadState.{@link ThreadState#bind bind()};
    {@link #doRun doRun}(targetRunnable);
} finally {
    threadState.{@link ThreadState#restore restore()}
}
</pre>
core/src/main/java/org/apache/shiro/subject/support/SubjectRunnable.java