Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Wiki MarkupPrograms may submit _only_ tasks that support interruption using {{Thread.interrupt()}} to thread pools that require the ability to shut down the thread pool or to cancel individual tasks within the pool. Programs must not submit tasks that lack interruption support to such thread pools. According to the Java API interface \[ [API 2006|AA. References#API 06]\], the {{java.util.concurrent.ExecutorService.shutdownNow()}} method

...attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution. There are no guarantees beyond best-effort attempts to stop processing actively executing tasks. For example, typical implementations will cancel via Thread.interrupt(), so any task that fails to respond to interrupts may never terminate.

...

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

TPS02-J

low

probable

medium

P4

L3

Bibliography

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="176177db-2090-4c68-abe3-de013bfa73c3"><ac:plain-text-body><![CDATA[

[ [API 2006AA. References#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="82aad5b3-6c10-4284-9596-31fb2a66cf78"><ac:plain-text-body><!

[CDATA[ [[Goetz 2006aAA. References#Goetz 06]]

Chapter 7, Cancellation and Shutdown ]]></ac:plain-text-body></ac:structured-macro>

...

      10. Thread Pools (TPS)