So if the goal of double-checked locking is supposed to offer improved performance over a more straightforward synchronized approach, this "fixed" version doesn't help very much either. 所以如果双重检查锁定的目标是提供比更直观的同步方式更好的性能,那么这个“修复的”版本也没有多大帮助。
Does this fix the double-checked locking problem? 这是否修改了双重检查锁定的问题?
One of the proposed fixes to the double-checked locking problem was to make the field that holds the lazily initialized instance a volatile field. 对双重检查锁定问题提出的一种修复是使包含迟缓初始化的实例的字段为一个volatile字段。
Instead of double-checked locking, use the Initialize-on-demand Holder Class idiom, which provides lazy initialization, is thread-safe, and is faster and less confusing than double-checked locking 不使用双重检查锁定,而使用Initialize-on-demandHolderClassidiom,它提供了迟缓初始化,是线程安全的,而且比双重检查锁定更快且没那么混乱
Under the new memory model, this "fix" to double-checked locking renders the idiom thread-safe. 在新的内存模型中,对双重检查锁定的这个“修复”使idiom线程安全。
I double-checked the output I got from this code. 我对这段代码的输出进行了仔细检查。
Make sure that you're reaching out to the right person in the right role. Once you've double-checked that you've got the right contact, scan their profile for clues. 一旦你仔细核查过你确实联系了该联系的人,那再查看他们的用户简介来寻找一些线索。
As always, news discovered online ( or anywhere else, really) should be double-checked before it's passed along& especially in times of tragedy. 同平时一样,在传播网上以及任何其他途径得来的消息之前应当进行核实,尤其是在这样的悲剧时刻。
A: I double-checked everything and found nothing was wrong. 我把所有的东西都检查了两遍,结果没有发现任何错误。
I double-checked the thermodynamics myself. 我反复检查过热力学数据。
I carefully sorted, washed and double-checked the fruit. 我仔细地挑选、清洗并再次检查了这些果子。
The team double-checked their results by soaking pieces of dried scallops in samples of wine. 研究小组把扇贝肉干浸泡在酒样中,对研究结果实行双重校验。
So he drove back to his apartment, double-checked his bank balance on his computer and headed back with his checkbook. 于是,他回到他的公寓中,双击选中他的银行存款余额,并拿着支票簿返回。
By the time I double-checked my gear and clothing, there were only six people left at the base. 等我再次检查完装备和衣物,山脚下只剩6个人了。
She double-checked her bag to make sure she'd got everything. 她再检查一下她的提包,确保该带的东西都带了。
He double-checked and saw a blue mould in the dish around which the bacteria had been destroyed. 他仔细检查了一下,发现盘子里有青色的霉斑,其周围的细菌都被消灭了。
Double-checked the fuel gauge before taking off. Counting Rate Metre 起飞前核查燃料计量器计数率测量器,计数表
All the appointments should be double-checked for accuracy. 为了准确起见,你还应当把所有的约会细节进行再三核实。
After lunch, we climbed into harnesses and helmets, all carefully checked and double-checked by our guides, and nervously awaited our turn to launch. 午餐后,我们钻进套索与安全帽中,每样装备都由导游仔细审慎地再三检查,然后我们就紧张地排队等待,准备跳跃。
But the hospital says, because of the hurry, test results were given over the telephone and were not double-checked. 但是院方称,因为紧急,检验结果是通过电话确认,而且没有进行再次确认。