Queue.st
changeset 4151 32fdabb21a15
parent 4067 b462a3ff3a61
child 4345 0000c66ef9f0
equal deleted inserted replaced
4150:40af3b9800f3 4151:32fdabb21a15
    47     The queue is created with a size argument, defining how many elements
    47     The queue is created with a size argument, defining how many elements
    48     are to be stored. It will report an error if the queue ever becomes full
    48     are to be stored. It will report an error if the queue ever becomes full
    49     and another element is to be added. 
    49     and another element is to be added. 
    50     Likewise, it will report an error if it is empty and an element is to be removed.
    50     Likewise, it will report an error if it is empty and an element is to be removed.
    51 
    51 
    52     It is NOT safe when two processes access instances of Queue simultaneously,
    52     It is NOT safe when two processes access the same queue-instance simultaneously,
    53     since accesses to the internals are not protected against process-switches.
    53     since accesses to the internals are not protected against process-switches.
    54     See SharedQueue for a class which IS safe w.r.t. processes and which blocks
    54     See SharedQueue for a class which IS safe w.r.t. processes and which blocks
    55     on write when full or on read when empty.
    55     on write when full or on read when empty.
    56 
    56 
    57     [Implementation note:]
    57     [Implementation note:]