AtomicLong can make sure at one time only one thread can use it
lock can lock a section of a procedure to ensure that only one thread to run the section of the procedure
synchronized is the synchronization of language'leve
AtomicLong can make sure at one time only one thread can use it
lock can lock a section of a procedure to ensure that only one thread to run the section of the procedure
synchronized is the synchronization of language'leve
转载于:https://www.cnblogs.com/ChenAlong/p/4058272.html