Note how the finally clause includes commit.
注意finally子句是如何包含commit的。
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 jury finally delivered its verdict.
陪审团终于宣布了裁决。
The performance finally started half an hour late.
晚了半小时以后演出终于开始了。
The coach finally arrived and we all piled on.
长途汽车终于开来了,我们一拥而上。
The boat finally grounded on a soft, underwater bank.
那条船最终在一个松软的水下浅滩搁浅了。
The wedding day finally arrived.
婚礼这一天终于到来。
The judge finally concluded there was insufficient evidence of premeditation.
该法官最后判定,没有证明存在预谋的足够证据。
The gang finally fled with a large amount of cash and jewellery.
那帮歹徒最终带着大量的现金和珠宝逃走了。
The man was finally cornered by police in a garage.
那名男子最终被警方逼到了车库里。
The mill was finally shut down by state safety inspectors.
这家工厂最终被州安全检查官关闭了。
The recession is finally beginning to show signs of bottoming out.
经济衰退终于出现了走出谷底的迹象。
The announcement finally laid all the speculation about their future to rest.
通告最终消除了一切有关他们的未来的推测。
The irony is that when he finally got the job, he discovered he didn't like it.
讽刺的是,当他最终得到那份工作时,他发现自己并不喜欢它。
When I finally posed the question, "Why?" he merely shrugged.
当我最终提出“为什么?”这个问题时,他只是耸耸肩。
She finally won the legal battle for compensation.
她终于赢得了这场要求赔偿的法律斗争。
Did the reality of war finally hit home?
人们最终深刻认识到战争的现实了吗?
Troy finally fell to the Greeks.
特洛伊城最终被希腊人攻陷。
My car finally gave up the ghost.
我的汽车终于报废了。
The war was finally at an end.
战争终于结束了。
The dreaded moment had finally arrived.
可怕的时刻终于来到了。
The stranded tourists were finally flown home.
受困的游客终于由飞机送返家园。
After some technical hitches the show finally got under way.
几个小的技术故障后演出终于开始了。
The bank finally came through with the money.
这家银行终于兑现了那笔钱。
The bank finally came through with the money.
这家银行终于兑现了那笔钱。
应用推荐