You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by fp...@apache.org on 2020/07/02 06:37:29 UTC
svn commit: r1879428 - /shiro/site/publish/subject.html
Author: fpapon
Date: Thu Jul 2 06:37:29 2020
New Revision: 1879428
URL: http://svn.apache.org/viewvc?rev=1879428&view=rev
Log:
merge pr-62
Modified:
shiro/site/publish/subject.html
Modified: shiro/site/publish/subject.html
URL: http://svn.apache.org/viewvc/shiro/site/publish/subject.html?rev=1879428&r1=1879427&r2=1879428&view=diff
==============================================================================
--- shiro/site/publish/subject.html (original)
+++ shiro/site/publish/subject.html Thu Jul 2 06:37:29 2020
@@ -450,7 +450,7 @@ try {
Callable work = //build/acquire a Callable instance.
//associate the work with the built subject so SecurityUtils.getSubject() calls works properly:
work = subject.associateWith(work);
-ExecutorService executorService = new java.util.concurrent.Executors.newCachedThreadPool();
+ExecutorService executor = java.util.concurrent.Executors.newCachedThreadPool();
//execute the work on a different thread as the built Subject:
executor.execute(work);
</code></pre>
@@ -459,8 +459,9 @@ executor.execute(work);
Runnable work = //build/acquire a Runnable instance.
//associate the work with the built subject so SecurityUtils.getSubject() calls works properly:
work = subject.associateWith(work);
-Executor executor = new java.util.concurrent.Executors.newCachedThreadPool();
-//execute the work on a different thread as the built Subject: executor.execute(work);
+ExecutorService executor = java.util.concurrent.Executors.newCachedThreadPool();
+//execute the work on a different thread as the built Subject:
+executor.execute(work);
</code></pre>
<div class="alert alert-success">
<span class="glyphicon glyphicon-ok"></span> <strong>Automatic Cleanup</strong>