File cmb_objectqueue.h

Parent directory (include)

A fixed-capacity queue where one or more producer processes (putters) can put arbitrary objects into the one end, and one or more consumer processes (getters) can get objects out of the other end. If space is not available, the producers wait, and if there is no content, the consumers wait.

Definition (include/cmb_objectqueue.h)

Detailed Description

The difference from cmb_buffer is that it only represents amounts, while cmb_objectqueue tracks the individual objects passing through the queue. An object can be anything, represented by void* here.

First in first out queue order only. No method implemented to cancel random objects from the queue. No record is kept of object holders, since the cmb_buffer and cmb_objectqueue essentially deal with assigning the available space in the resource to processes, not lending pieces of a resource to processes. The objects holding a part of a cmb_objectqueue are already in the queue. Hence, no need for forced removal (drop) of holder processes either.

Includes

Included By

Classes