malaikuangren

What is the purpose or drive to build thing like (xxx),How can it achieve the original goal of design?

2012年7月15日

The Atomic classes in Java 5: AtomicInteger and AtomicLong,AtomicReference etc.

摘要: TheAtomicIntegerclass has a number of uses, but one is a drop-in replacement for an atomic counter. Before Java 5, we had to write classes with access to the counter variable insynchronizedblocks or methods, or else use avolatilevariable which is a lighter form of synchronization but with the risk t 阅读全文

posted @ 2012-07-15 17:23 malaikuangren 阅读(508) 评论(0) 推荐(0) 编辑