usnistgov / jsip

JSIP: Java SIP specification Reference Implementation (moved from java.net)
Other
287 stars 130 forks source link

Fix for https://github.com/usnistgov/jsip/issues/46 debug counter not… #47

Closed vladimirralev closed 5 years ago

vladimirralev commented 5 years ago

… thread safe and counting in non-debug mode

jagagit commented 5 years ago

bro,volatile for nesting_level variable solves only data visibility problem between threads.still it will create data inconsistency.I am suggesting to use AtomicLong class in java.util.concurrent.atomic packages. if Debugging only for single threaded environment .above point are pointless :)

vladimirralev commented 5 years ago

Yeah totally messed up. Will fix.