Uploaded image for project: 'Jalview'
  1. Jalview
  2. JAL-4215

AlignCalcWorker should use synchronised list to store annotations.

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: In Progress
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.12.0
    • Component/s: analysis, Dev and Dep, renderer
    • Labels:
      None

      Description

      AlignCalcWorker#removeAnnotation uses synchronisation on the ourAnnots list when iterating over annotations, but it's the only place when the synchronisation block is actually used. Just after leaving the synchronized block, it clears the list in a thread-unsafe way. Racing conditions and concurrent modifications may occur if multiple threads operate on the worker, which is not the case currently as the AlignCalcManager is single-threaded. AlignCalcWorker should either be deemed not thread-safe or enforce ourAnnots to be fully synchronised.

        Attachments

          Activity

            People

            Assignee:
            mmwarowny Mateusz Warowny
            Reporter:
            mmwarowny Mateusz Warowny
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: