[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jfriends-ml 12489] Re: 「 JAVA CONCURRENCY IN PRACTICE 」を読 む会第 3 回議 事録



  高橋(智)です。

  Dequeですが、
  [Java 6 Platform Revealed]
    http://www.amazon.co.jp/exec/obidos/ASIN/1590596609
によりますと、次のように解説されておりました。

---抜粋して引用---
 Why use a deque? Deques are useful data structures for recursive problems, like
searching through a maze or parsing source. As you move along a path, you save "good"
spots, adding more data along the way while you think the path is good. If the path
turns bad, you pop off the bad bits, returning to the last good spot. Here, you would
be adding and removing from the same end, like a stack. Once you find your way through,
you start back at the beginning to reveal the solution, which starts at the other end.
------------------

Masatoshi Komatsu wrote:
snip 
> ○Dequeとは?
>  ⇒先頭、末尾の双方に対して要素の挿入・削除が可能なキュー
>  ⇒生産者と消費者が 1 対 1 でキューを持ち、消費者は基本は自分のキューの
> head
>   から作業を取り出すが、他人のキューのtailからも作業を取り出す、というような
>   パターン(work stealing)を実現できる
snip 

-- 
高橋智宏
  Java読書会( http://www.javareading.com/bof/ )