AtomicInteger lazySet and set

Posted by Yan Cheng CHEOK on Stack Overflow See other posts from Stack Overflow or by Yan Cheng CHEOK
Published on 2009-09-23T19:07:23Z Indexed on 2010/04/23 21:23 UTC
Read the original article Hit count: 257

Filed under:
|
|

May I know what is the difference among lazySet and set method for AtomicInteger. javadoc doesn't talk much about lazySet :

Eventually sets to the given value.

It seems that AtomicInteger will not immediately be set to the desired value, but it will be scheduled to be set in some time. But, what is the practical use of this method? Any example?

© Stack Overflow or respective owner

Related posts about java

Related posts about concurrency