Merge pull request #27 from gfinocchiaro/master
Remove synchronized from nextSerialNumber
This commit is contained in:
commit
d6fb2825ec
@ -8,7 +8,7 @@ public class
|
|||||||
AtomicSerialNumbers extends SerialNumbers {
|
AtomicSerialNumbers extends SerialNumbers {
|
||||||
private AtomicInteger serialNumber =
|
private AtomicInteger serialNumber =
|
||||||
new AtomicInteger();
|
new AtomicInteger();
|
||||||
public synchronized int nextSerialNumber() {
|
public int nextSerialNumber() {
|
||||||
return serialNumber.getAndIncrement();
|
return serialNumber.getAndIncrement();
|
||||||
}
|
}
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user