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

Undersynchronization/Busy-Waiting in LaunchDownload

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b34
    • CPU:
      x86
    • OS:
      linux

      Backports

        Description

        A DESCRIPTION OF THE REQUEST :

        The Webstart-Class LaunchDownload has two small unsightly issues:
        1.) Some undersynchronization when accessing thread-global static variables
        2.) Busy waiting for available updates: while (_numThread > 0 ) { if(..){break;} ....}

        I've refactoted the code a bit to use a seperate protected class, which now also encapsulates the thread-shared-variablesm instead of an anonymous inner class used before. This encapsulates the inter-thread access, and hopefully will lead to less problems when implementing future additions.

        JUSTIFICATION :
        1.) Undersynchronization is dangerous, it could happen that it waits to long because the value is not updated correctly.
        2.) Busy waiting is ugly in general ;)

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                nam Nam Nguyen (Inactive)
                Reporter:
                ndcosta Nelson Dcosta (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: