The finally block ensures that the object is returned to the pool even if an exception occurs.
Finally块确保了即使发生异常,也会将对象返回到池中。
In that scenario, the finally never runs so the lock leaks, probably eventually deadlocking the program.
在这样的情形下,finally不会执行,那么也就产生了程序锁泄漏,程序有可能出现死锁。
Fortunately, all of these are handled by the finally clause, which releases all the resources used by copyFile .
幸运的是,所有这些都由finally语句来处理,该语句释放了copyFile所使用的所有资源。
It is possible for an exception to occur that forces a branch to the finally clause of the lock statement, releasing the lock and allowing access to any waiting thread to the corrupted resource.
强行进入lock语句的finally子句、释放锁以及允许访问任意等待线程(该线程占用了已被破坏的资源),都有可能引发异常。
火焰终于减弱了。
The action slips from comedy to melodrama and finally to tragedy.
剧情由喜剧慢慢发展成闹剧,最后又演变为悲剧。
The irony is that when he finally got the job, he discovered he didn't like it.
讽刺的是,当他最终得到那份工作时,他发现自己并不喜欢它。
Police finally managed to overpower the gunman.
警察最终制伏了持枪歹徒。
His temperature continued to rise and the cough worsened until Tania finally persuaded him to see a doctor.
他的体温持续升高且咳嗽加重,直到塔妮娅最终说服了他去看医生。
She eventually used a cane, then a walker, and finally was confined to the house.
结果她拄上了拐杖,之后又用上了步行器,最后连房门都出不了了。
A United Nations aid convoy loaded with food and medicine finally got through to the besieged town.
一支联合国援助车队载着食物和药物终于抵达了被围困的市镇。
It was only when he finally drifted off to sleep that the headaches eased.
当他最终慢慢睡着时,头疼才减轻了。
He finally corrected his misstatement and offered to reduce the fee.
他最终纠正了自己的错误说法,提出要减少费用。
I finally managed to whittle down the names on the list to only five.
我最后总算把名单上的名字减少到了只有五个。
The stranded tourists were finally flown home.
受困的游客终于由飞机送返家园。
After 15 years in the U.S., he has finally decided to apply for American citizenship.
在美国住了15年后,他最终决定申请美国的公民身份。
Finally, the plant absorbs the nutrients released.
最后,植物吸收释放出来的营养。
The sequel will finally unveil the family secret of why Po's father is a duck.
续集将最终揭开为什么阿宝的父亲是只鸭子的家庭秘密。
She finally found the perfect gown, a beautiful creation trimmed with lace.
她最终找到了那件完美的大衣,款式漂亮、饰有花边。
Steve finally coughed up the money he owed us.
史蒂夫最终勉强归还了他欠我们的钱。
The wall through Berlin was finally ruptured, prefiguring the reunification of Germany.
柏林墙终于倒塌了,预示着德国的重新统一。
After lengthy talks the two sides finally reached a compromise.
双方经过长期的商谈终于达成了妥协。
Party activists in New Hampshire rejoiced that the presidential campaign had finally started.
新罕布什尔州的党派积极分子们为总统竞选活动终于开始而欣喜。
He was finally forced off the political stage last year by the deterioration of his physical condition.
他最终因身体状况恶化于去年被迫离开了政治舞台。
I bought into the popular myth that when I got the new car or the next house, I'd finally be happy.
我相信了这种大众神话,以为只要买上新车或再买栋房子就会最终幸福起来。
So it is possible that the symptoms will not finally go until your nervous system is in a better state.
可能这些症状不会彻底消失,除非你的神经系统有所改善。
Finally, the Bolsheviks signed an armistice with Germany.
布尔什维克最终与德国签署了停战协议。
The storm got worse and worse. Finally, I was obliged to abandon the car and continue on foot.
暴风雨越来越猛烈。最终,我被迫弃车徒步前行。
I passed the examination finally.
最终我通过了考试。
The librarian finally searched out the book I wanted.
图书管理员最后找出了我要借的那本书。
应用推荐