...
Similarly, tasks that use some mechanism other than Thread.interrupted()
to determine when to shut down will be unresponsive to shutdown()
or shutdownNow()
. For instance, tasks that check a volatile flag to determine whether it is safe to shutdown will be unresponsive to these methods. The rule THI05 THI06-J. Do not use Thread.stop() to terminate threads provides more information on using a flag to terminate threads.
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="70b01f6e65d0d42a-833fc415-47da4297-b6da88ff-c1a336737cae43152d416413"><ac:plain-text-body><![CDATA[ | [[API 2006 | AA. Bibliography#API 06]] | interface ExecutorService | ]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="18779790530ef388-d9ec38ab-41054ea3-a1d79988-9a69b957f792424177250c9a"><ac:plain-text-body><![CDATA[ | [[Goetz 2006 | AA. Bibliography#Goetz 06]] | Chapter 7: Cancellation and shutdown | ]]></ac:plain-text-body></ac:structured-macro> |
...