参考:http://www.vogella.com/articles/JavaConcurrency/article.html#concurrency_overview
?
-
reading or writing a variable(except the variable is of type long or double)
- only and if volatile keyword was declared then operation type long or double variables
-
i++ is not atomatic operation(AtomicInteger Or AtomicLong can handler this)