Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6561443

Timeout on synchronized blocks

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P5 P5
    • None
    • 6
    • hotspot
    • x86
    • windows_xp

      A DESCRIPTION OF THE REQUEST :
      Within bug id 4140870 a request was formulated for timeout on synchronized blocks. The solution proposed was to use concurrent.locks.ReentrantLocks.

      This is not always applicable:

      In case of third party libraries we have no way of changing the code from synchronized(){} to use the concurrent package.

      We therefore request to add a VM attribute for example -DdeadlockTimeout, which would throw an exception if a dead lock is encountered for longer than a given time period.

      JUSTIFICATION :
      In case of third party libraries we have no way of changing the code from synchronized(){} to use the concurrent package.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      We therefore request to add a VM attribute for example -DdeadlockTimeout, which would throw an exception if a dead lock is encountered for longer than a given time period.
      ACTUAL -
      Currently the application just hangs.

            Unassigned Unassigned
            ryeung Roger Yeung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: