简体   繁体   English

Java 变量句柄/ memory 模式

[英]Java varhandle/ memory modes

I understood the theory behind varhandles and the different memory modes, but finding it hard to write examples/ small programs that demonstrate how different modes behave.我了解 varhandles 和不同的 memory 模式背后的理论,但发现很难编写示例/小程序来演示不同模式的行为方式。

Are you aware of any documentation, public git repos or other resources that might help in this?您是否知道任何可能对此有帮助的文档、公共 git 存储库或其他资源?

There are a couple of amazing writings from Aleksey Shipilëv ( https://shipilev.net ) regarding the Java memory model: Aleksey Shipilëv ( https://shipilev.net ) 关于 Java memory model 有几篇精彩的文章:

Also I can recommend taking a look at jcstress (Java Concurrency Stress) library for experimenting with Java Concurrency.此外,我还建议您查看jcstress (Java 并发压力)库以试验 Java 并发。 A good start would be the examples in the same git repository .一个好的开始是同一个 git 存储库中的示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM