4 ms·
Secrets of Cocoa's dispatch_once
- pcwalton 11y agoI really like this article, because it's a great description of the level of hardware knowledge you must be programming with in order to successfully elide atomics on the fast path for concurrent programming on multicore. If you aren't familiar with your CPU architecture on the microcode level, don't risk it. Your naive double-checked locking code is almost certainly broken. Just use atomics on the fast path.
- CyberDildonics 11y ago> Your naive double-checked locking code is almost certainly broken Is there anywhere I can read a little more about this?
- saurik 11y agohttps://news.ycombinator.com/item?id=7860531 https://news.ycombinator.com/item?id=7860531
- alblue 11y ago(2014)