本文整理匯總了Java中co.paralleluniverse.strands.Timeout類的典型用法代碼示例。如果您正苦於以下問題:Java Timeout類的具體用法?Java Timeout怎麽用?Java Timeout使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Timeout類屬於co.paralleluniverse.strands包,在下文中一共展示了Timeout類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setUp
import co.paralleluniverse.strands.Timeout; //導入依賴的package包/類
@Before
public void setUp() throws Exception {
r = new Router(Pattern.quote("@Mars"), true);
defaultTimeout = new Timeout(5, TimeUnit.SECONDS);
dummy = Channels.newChannel(0);
}
示例2: receive
import co.paralleluniverse.strands.Timeout; //導入依賴的package包/類
@Override
public T receive(Timeout timeout) throws SuspendExecution, InterruptedException {
return receive();
}
示例3: setUp
import co.paralleluniverse.strands.Timeout; //導入依賴的package包/類
@Before
public void setUp() throws Exception {
r = new Router(Pattern.quote("@Mars"));
defaultTimeout = new Timeout(3000, TimeUnit.MILLISECONDS);
dummy = Channels.newChannel(0);
}