Only cancel pending requests as last resort before stopping the Communiqué instance. Canceling a request can lead to an unstable instance. Stopping a thread causes it to unlock all the monitors that it has locked. (The monitors are unlocked as the ThreadDeath exception propagates up the stack.) If any of the objects that these monitors previously protected were in an inconsistent state, it's possible that other threads now view these objects in an inconsistent state. Such objects are said to be damaged. When threads operate on damaged objects, arbitrary behavior can result.
This behavior can be subtle and difficult to detect, or it could be pronounced. Unlike other unchecked exceptions, ThreadDeath kills threads silently. Therefore, the user has no warning that the program is corrupted. The corruption can manifest itself at any time after the actual damage occurs, even hours or days in the future.

이 작업에는 Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License의 라이센스가 부여되었습니다.  Twitter™ 및 Facebook 게시물은 Creative Commons 약관을 적용받지 않습니다.

법적 고지 사항   |   온라인 개인 정보 보호 정책