Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-3363

Synchronizing on Boolean

    XMLWordPrintable

    Details

      Description

      ServiceContext class has methods which synchronize on refreshContext boolean variable. Java typically creates only two objects of boolean type. So its better to synchronize on a different object lock. I've tested this behavior on a test code, and indeed it seemed that java just had two objects for boolean type.

      Since the ServiceContext is used quite frequently, the synchronization policy selected will impact performance.

        Gliffy Diagrams

          Attachments

          1. TRUNK - 3363.patch
            3 kB
          2. trUNK - 3363 (2).patch
            3 kB
          3. trunk-3363-3.patch
            3 kB

            Issue Links

              Activity

                People

                Assignee:
                porzechowski Piotr Orzechowski
                Reporter:
                sagashe Shripad Agashe
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: