java concurrency
静心观复
这个作者很懒,什么都没留下…
展开
-
Fail Fast Vs Fail Safe Iterators In Java With Examples
Brief Introduction To Fail Fast And Fail Safe Systems :A system is called fail-fast if it is shut down immediately when an error occurred. These systems don’t carry on with the errors. They immediate...转载 2019-12-19 15:43:44 · 167 阅读 · 0 评论 -
Java ThreadLocal
The Java ThreadLocal class enables you to create variables that can only be read and written by the same thread. Thus, even if two threads are executing the same code, and the code has a reference to ...转载 2019-12-19 14:13:47 · 174 阅读 · 0 评论 -
CAS(Compare and Swap) and Atomic Variables in Java
One of the best additions in java 5 was Atomic operations supported in classes such as AtomicInteger, AtomicLong etc. These classes help you in minimizing the need of complex (un-necessary) multi-thre...原创 2019-09-06 14:10:33 · 292 阅读 · 0 评论 -
Spurious Wakeups in Java
What is Spurious Wakeups in Java threads?Object.wait() is supposed to block until either another thread invokes the Object.notify() or Object.notifyAll() method, or a specified amount of time has ela...原创 2019-09-17 11:22:00 · 235 阅读 · 0 评论 -
Producer-Consumer Solution in Java
Producer and consumer problem is a synchronization issue when multiple threads are sharing a single resource. The producer and the consumer are two separate threads, but they use the same resource/buf...原创 2019-09-17 11:23:40 · 183 阅读 · 0 评论