Seven Ways to Refactor Java Switch Statements
最近在浏览V2ex的时候发现一个帖子很有趣,Java 代码 switch 分支过多,怎么改写比较优雅呢?,在留言里面发现一篇文章,觉得挺好,转载在这。 Is a well-known
Understanding Memory Reordering
系列的第四篇~ In the previous article of this series, Lock-free multithreading with atomic operations, I introduced lock-free multithreading: a low-level strategy for synchronizing threads in concurrent software. Based upon atomic operations — machine instructions performed directly by the CPU that can’t be broken into smaller steps, lock-free multithreading provides a faster and more fine-tuned synchronization mechanism if compared to traditional primitives like mutexes and semaphores.