necessary synchronization?
it is necessary to synchronize the being followed block of code or all the useless one?
privatefinallong inc(long value){
synchronized (this){
value++;
if (value == Long.MAX_VALUE){
value = 0;
}
}
return value;
}
Thank's
it is necessary to synchronize the being followed block of code or all the useless one?
privatefinallong inc(long value){
synchronized (this){
value++;
if (value == Long.MAX_VALUE){
value = 0;
}
}
return value;
}
Thank's