Versions Compared

Key

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

Holding locks while performing time consuming or blocking operations can severely degrade system performance and result in starvation. Furthermore, deadlock may result if too many interdependent threads block. Blocking operations include network, file and console I/O (for instance, invoking a method such as Console.readLine()) and object serialization. Deferring a thread indefinitely also constitutes a blocking operation.

...