Uploaded image for project: 'Commons VFS'
  1. Commons VFS
  2. VFS-326

Multi-threading issues

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Labels:
      None

      Description

      SoftRefFilesCache and DefaultFileMonitor use a boolean to communicate between threads, but don't use synchronisation.
      There is no guarantee that the updated value of the boolean will be seen by the other thread. Adding volatile would fix this.

      There are also various private instance fields that are not modified after construction.
      If these were made final, it would improve thread-safety because the fields would then be published correctly across threads.

        Attachments

          Activity

            People

            • Assignee:
              sebb Sebb
              Reporter:
              sebb Sebb
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: