QueueValue

From OpenCog
Jump to: navigation, search

The QueueValue is a type of LinkValue that implements a thread-safe FIFO. Any number of threads can place Values into the FIFO, while other threads can safely dequeue them one at a time, or even grab the entire queue contents. It can be in one of two states: "open" and "closed"; then closed, it is meant to indicate that the writers have no more results to provide. Thus, it is a kind of a "future" for Atoms and Values.