Story #7635: thread-safety in libclient_java
refactor libclient to remove synchronized from the 2 key methods
will have to keep track of latestUrl by thread. The get and setLatestUrl methods can call Thread.currentThread.getId() as a key for the latestUrl map.
The addHeader method might need to be either changed the same way, or javadoc'ed.
refs: #7633. Removed synchronized keyword from doRequest methods. made latestUrl property thread-specific, and modified getters and setters to map the correct values. Unit test demonstrate proper behavior.
#3 Updated by Rob Nahf over 6 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 30
refactored the get/setLatestUrl to track the state of this property by Thread. Added a parameterized getLatestUrl(Thread t) method to facilitate cross-thread querying. Removed synchronized from doRequestNoBody and doRequestMMPBody. Wrote multithreaded "unit" test to visually check that the correct returns are coming out of the method.