문제

Does anybody know of a test that reproduces "broken double checked locking" problem in java?

도움이 되었습니까?

해결책

Checkout this project: java-concurrency-torture. It is written by Alexey Shipilev. He is Java Performance Engineer who works at Oracle. Here is a bunch of tests for different kinds of singleton initialization practices.

Important: To maximize your chances to see DCL bug you should run these tests with -server flag on 32-bit jvm.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top