com.google.common.util.concurrent.AbstractFuture.removeWaiter()方法的使用及代码示例

x33g5p2x  于11个月前 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(36)

本文整理了Java中com.google.common.util.concurrent.AbstractFuture.removeWaiter()方法的一些代码示例,展示了AbstractFuture.removeWaiter()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractFuture.removeWaiter()方法的具体详情如下:
包路径:com.google.common.util.concurrent.AbstractFuture
类名称:AbstractFuture
方法名:removeWaiter

AbstractFuture.removeWaiter介绍

[英]Marks the given node as 'deleted' (null waiter) and then scans the list to unlink all deleted nodes. This is an O(n) operation in the common case (and O(n^2) in the worst), but we are saved by two things.

  • This is only called when a waiting thread times out or is interrupted. Both of which should be rare.
  • The waiters list should be very short.
    [中]将给定节点标记为“已删除”(空),然后扫描列表以取消所有已删除节点的链接。在一般情况下,这是一个O(n)操作(在最坏的情况下是O(n^2)),但有两件事拯救了我们。
    *仅当等待的线程超时或中断时才调用此函数。这两种情况都应该很少见。
    *服务员名单应该很短。

代码示例

代码示例来源:origin: google/guava

removeWaiter(node);
 throw new InterruptedException();
if (remainingNanos < SPIN_THRESHOLD_NANOS) {
 removeWaiter(node);
 break long_wait_loop; // jump down to the busy wait loop

代码示例来源:origin: google/guava

removeWaiter(node);
throw new InterruptedException();

代码示例来源:origin: google/j2objc

removeWaiter(node);
 throw new InterruptedException();
if (remainingNanos < SPIN_THRESHOLD_NANOS) {
 removeWaiter(node);
 break long_wait_loop; // jump down to the busy wait loop

代码示例来源:origin: wildfly/wildfly

removeWaiter(node);
 throw new InterruptedException();
if (remainingNanos < SPIN_THRESHOLD_NANOS) {
 removeWaiter(node);
 break long_wait_loop; // jump down to the busy wait loop

代码示例来源:origin: google/j2objc

removeWaiter(node);
throw new InterruptedException();

代码示例来源:origin: wildfly/wildfly

removeWaiter(node);
throw new InterruptedException();

代码示例来源:origin: com.diffplug.guava/guava-concurrent

removeWaiter(node);
  throw new InterruptedException();
if (remainingNanos < SPIN_THRESHOLD_NANOS) {
  removeWaiter(node);
  break long_wait_loop; // jump down to the busy wait loop

代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

removeWaiter(node);
 throw new InterruptedException();
if (remainingNanos < SPIN_THRESHOLD_NANOS) {
 removeWaiter(node);
 break long_wait_loop; // jump down to the busy wait loop

代码示例来源:origin: org.jboss.eap/wildfly-client-all

removeWaiter(node);
 throw new InterruptedException();
if (remainingNanos < SPIN_THRESHOLD_NANOS) {
 removeWaiter(node);
 break long_wait_loop; // jump down to the busy wait loop

代码示例来源:origin: com.diffplug.guava/guava-concurrent

removeWaiter(node);
throw new InterruptedException();

代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

removeWaiter(node);
throw new InterruptedException();

代码示例来源:origin: org.jboss.eap/wildfly-client-all

removeWaiter(node);
throw new InterruptedException();

相关文章