【发布时间】:2015-09-13 20:55:19
【问题描述】:
我正在制作一个在 Disruptor (https://github.com/LMAX-Exchange/disruptor/wiki) 之上创建演员模型的原型。根据所有示例,事件的突变不使用 volatile 或任何其他方式来确保保留可见性。我想知道是什么让它安全?
在常见问题解答中,这听起来像是已处理 (https://github.com/LMAX-Exchange/disruptor/wiki/Frequently-Asked-Questions#do-you-relax-the-consistency-model-to-gain-performance),但我还没有看到如何处理。
感谢您抽出宝贵时间阅读本文!
【问题讨论】: