Versions Compared

Key

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

...

Wiki Markup
If the JVM interacts with a file system that operates over an unreliable network, file I/O might incur a large performance penalty. In such cases, avoid file I/O over the network when holding a lock. File operations (such as logging) that maycould block waiting for the output stream lock or for I/O to complete maycould be performed in a dedicated thread to speed up task processing. Logging requests can be added to a queue, given that the queue's {{put()}} operation incurs little overhead as compared to file I/O \[[Goetz 2006|AA. Bibliography#Goetz 06]\].

...

LCK09-EX1: Classes that provide an appropriate termination mechanism to callers are allowed to violate this guideline (see . See guideline THI06-J. Ensure that threads performing blocking operations can be terminated).

LCK09-EX2: A method that requires multiple locks may hold several locks while waiting for the remaining locks to become available. This constitutes a valid exception, although the programmer must follow other applicable guidelines to avoid deadlock. See guideline LCK07-J. Avoid deadlock by requesting and releasing locks in the same order for more information.

...

Blocking or lengthy operations performed within synchronized regions may could result in a deadlocked or unresponsive system.

...