Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7113772

jtreg should provide way to ensure exclusive access to resources

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • jtreg4.1
    • jtreg4.1
    • tools
    • None
    • b04
    • generic
    • generic

      Some tests need exclusive access to shared resources. With greater use of agentvm mode to support concurrent test execution, the need to support exclusive access is becoming more important.

      Proposal

      Support an option on @run main
      /lock[:name]

      Support a commnd line option -lockdir <dir>

      By default, /lock will acquire a JVM lock (on an internal object) for the duration of the action. The object will be specific to the name, if a name is given. Otherwise a default name will be assumed.

      If -lockdir is specified, /lock wil also get a file lock for a temporary file in the specified directory. This can be used to establish locking between concurrent instances of jtreg.

            jjg Jonathan Gibbons
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: