通过在工作完成时发出commit语句,并且确保数据是正确的,就释放了该数据以供其它应用程序使用。
By issuing COMMIT statements when work is complete, and ensuring that the data is accurate, you free up that data for other applications to use.
强行进入lock语句的finally子句、释放锁以及允许访问任意等待线程(该线程占用了已被破坏的资源),都有可能引发异常。
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之后对应执行一个unlock方法,而且它们应该置于try- finally复杂语句中。
To ensure that locks are released, simply pair every lock method with an unlock method, which should be placed in a try-finally block. This is illustrated in Listing 4.
在DB 2 9.7之前,AppB发出的语句会被挂起,因为它要等待释放AppA (writer)的update语句持有的排他锁。
Prior to DB2 9.7, the statement issued by AppB would hang because it would wait for the exclusive lock held by the update statement of AppA (the writer) to be released.
一旦应用程序变量被绑定到某个参数标记,这种关联就会一直保持下去,直到相应的语句句柄被释放。
Once an application variable is bound to a parameter marker, the association remains until it is overridden or until the corresponding statement handle is freed.
ifconfig down语句将释放资源。
幸运的是,所有这些都由finally语句来处理,该语句释放了copyFile所使用的所有资源。
Fortunately, all of these are handled by the finally clause, which releases all the resources used by copyFile .
因此,会释放这一行的DB2更新锁,清单2中的下一个SQLselect语句会看到这一行。
As a result, the DB2 update lock for the row is released and this row is found by the next SQL select statement in Listing 2.
当你需要释放大量查询语句的内存时,使用这个函数将非常有效。
However, this function can be useful when you want to free up memory between large queries.
作为语句,用于定义一个范围,在此范围的末尾将释放对象。
As a statement, when it defines a scope at the end of which an object will be disposed.
作为语句,用于定义一个范围,在此范围的末尾将释放对象。
As a statement, when it defines a scope at the end of which an object will be disposed.
应用推荐