Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This compliant solution sets an uncaught exception handler on behalf of the thread pool. During its construction, an An argument of type ThreadFactory is passed to the thread pool while constructing it. The factory is responsible for creating new threads and setting the uncaught exception handler on their behalf. The class Task remains the same as the noncompliant code example.

...