blockingqueue

blockingqueueblockingqueue
  1. There are two sets of Queue implementations in Tiger : those that implement the new BlockingQueue interface , and those that don 't.

    在Tiger中有两组Queue实现:实现了新BlockingQueue接口的和没有实现这个接口的。

  2. The BlockingQueue interface states that it is a Queue , meaning that its items are stored in first in , first out ( FIFO ) order .

    BlockingQueue接口表示它是一个Queue,意思是它的项以先入先出(FIFO)顺序存储。

  3. BlockingQueue also supports methods that take a time parameter , indicating how long the thread should block before returning to signal failure to insert or retrieve the item in question .

    BlockingQueue还支持接收时间参数的方法,时间参数表明线程在返回信号故障以插入或者检索有关项之前需要阻塞的时间。

  4. It is a specific type of BlockingQueue : getting an item from the queue will block until the delay has passed , if an item isn 't available immediately .

    它是一种特定类型的BlockingQueue:如果一个项不可用,则从队列获取该项会受到阻止,直到延迟失效。

  5. The prime-seeking loop checks for interruption in two places : once by polling the isInterrupted () method in the header of the while loop and once when it calls the blocking BlockingQueue . put () method .

    用于搜索素数的循环在两个地方检查是否有中断:一处是在while循环的头部轮询isInterrupted()方法,另一处是调用阻塞方法BlockingQueue.put()。