Apache mina等待和awaitUninterruptibly

时间:2013-08-01 19:00:48

标签: java apache mina

两种方法有什么区别?在哪种情况下,应该使用另一个?

/**
 * Wait for the asynchronous operation to complete with the specified timeout.
 *
 * @return <tt>true</tt> if the operation is completed.
 */
boolean await(long timeoutMillis) throws InterruptedException;

对战

/**
 * Wait for the asynchronous operation to complete with the specified timeout
 * uninterruptibly.
 *
 * @return <tt>true</tt> if the operation is finished.
 */
boolean awaitUninterruptibly(long timeoutMillis);

0 个答案:

没有答案