Timeline for Is this method thread safe?
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 4, 2012 at 3:36 | comment | added | Clint | To be honest I'm not sure what you are trying to accomplish. But synchronizing the getNewId() method would make the whole system safe. | |
Apr 3, 2012 at 19:48 | comment | added | Rajat Gupta |
Thankyou so much! To solve this issue, should I include regstrdUserIdsCount_Cached inside the synchronized block & make it as a non final int instead of atomicInteger ?
|
|
Apr 3, 2012 at 19:46 | vote | accept | Rajat Gupta | ||
Apr 2, 2012 at 19:22 | history | answered | Clint | CC BY-SA 3.0 |