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 empire finally crumbled into dust.
这个帝国最终崩溃了。
The jury finally delivered its verdict.
陪审团终于宣布了裁决。
The performance finally started half an hour late.
晚了半小时以后演出终于开始了。
The boat finally grounded on a soft, underwater bank.
那条船最终在一个松软的水下浅滩搁浅了。
The regime finally collapsed after 25 years of misrule.
在施行了25年的蠹政后,这个政权最终垮台。
The coach finally arrived and we all piled on.
长途汽车终于开来了,我们一拥而上。
The police finally got a confession out of her.
警方最终逼迫她招了供。
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 sex scandal finally led to his downfall.
这桩绯闻最终使他身败名裂。
The mill was finally shut down by state safety inspectors.
这家工厂最终被州安全检查官关闭了。
The man was finally cornered by police in a garage.
那名男子最终被警方逼到了车库里。
The recession is finally beginning to show signs of bottoming out.
经济衰退终于出现了走出谷底的迹象。
The announcement finally laid all the speculation about their future to rest.
通告最终消除了一切有关他们的未来的推测。
The bitter arguments and recriminations have finally ended the relationship.
充满仇恨的争吵和互相指责最终结束了这段关系。
He killed 12 people before the authorities finally nabbed him.
他杀了12个人之后才最终被当局抓获。
Discontent among the ship's crew finally led to the outbreak of mutiny.
船员的不满情绪最终酿成了暴乱。
The war was finally at an end.
战争终于结束了。
The dreaded moment had finally arrived.
可怕的时刻终于来到了。
The stranded tourists were finally flown home.
受困的游客终于由飞机送返家园。
The stranded tourists were finally flown home.
受困的游客终于由飞机送返家园。
应用推荐