Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.4.2, 1.5.0
Description
In SampleAsyncFunction having executorService and random as static, but counter as instance-specific will not work when someone creates a second instance of SampleAsyncFunction. In second SampleAsyncFunction the counter will be 0 and we will re-intialize static executorService and random, thus interfering with the first SampleAsyncFunction object.
To fix this example and make it clearer, make executorService and random instance-specific. That will make counter redundant; also synchronization on class will no longer be needed.
Attachments
Issue Links
- links to