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

Undersynchronization/Busy-Waiting in LaunchDownload

XMLWordPrintable

    • b34
    • x86
    • linux

        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 ;)

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

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: