-
Bug
-
Resolution: Fixed
-
P4
-
7
-
b34
-
x86
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2223389 | 7u6 | Nam Nguyen | P4 | Closed | Fixed | b06 |
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 ;)
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 ;)
- backported by
-
JDK-2223389 Undersynchronization/Busy-Waiting in LaunchDownload
-
- Closed
-