diff --git a/doc/precompiled/fifo b/doc/precompiled/fifo new file mode 100644 index 0000000000000000000000000000000000000000..3d83d9f88ded53ebd489c089a93335c7eee957cb --- /dev/null +++ b/doc/precompiled/fifo @@ -0,0 +1,73 @@ +NAME + /precompiled/fifo - first in, first out object + +DESCRIPTION + /precompiled/fifo implements a fixed length fifo. A fifo is a queue + of values and is often used as a stream of data between two threads. + +SEE ALSO + /precompiled/queue + +NOTA BENE + Fifos are only available on systems with POSIX threads support. + +============================================================================ +NAME + create - initialize the fifo + +SYNTAX + #include <fifo.h> + + void fifo->create(int size); + or + clone(Fifo); + or + clone(Fifo,size); + +DESCRIPTION + The function create() is called when the fifo is cloned, if the + optional size argument is present it sets how many values can be + written to the fifo without blocking. The default size is 128. + +============================================================================ +NAME + write - queue a value + +SYNTAX + #include <fifo.h> + + void fifo->write(mixed value); + +DESCRIPTION + This function puts a value last in the fifo. If there is no more + room in the fifo the current thread will sleep until space is + available. + +============================================================================ +NAME + read - read a value from the fifo + +SYNTAX + #include <fifo.h> + + mixed fifo->read(); + +DESCRIPTION + This function retreives a value from the fifo. Values will be + returned in the order they were written. If there are no values + present in the fifo the current thread will sleep until some other + thread writes a value to the fifo. + +============================================================================ +NAME + size - return number of values in fifo + +SYNTAX + #include <fifo.h> + + int fifo->size(); + +DESCRIPTION + This function returns how many values are currently in the fifo. + +============================================================================ diff --git a/doc/precompiled/queue b/doc/precompiled/queue new file mode 100644 index 0000000000000000000000000000000000000000..0778f80873741ccf140525866535966109af60bc --- /dev/null +++ b/doc/precompiled/queue @@ -0,0 +1,56 @@ +NAME + /precompiled/queue - a queue of values + +DESCRIPTION + /precompiled/queue implements a queue, or fifo. The main differance + between /precompiled/queue and /precompiled/fifo is that queues + will never block in write, only allocate more memory. + +SEE ALSO + /precompiled/fifo + +NOTA BENE + Queues are only available on systems with POSIX threads support. + +============================================================================ +NAME + write - queue a value + +SYNTAX + #include <fifo.h> + + void queue->write(mixed value); + +DESCRIPTION + This function puts a value last in the queue. If the queue is + to small to hold the value the queue will be expanded to make + room for it. + +============================================================================ +NAME + read - read a value from the queue + +SYNTAX + #include <fifo.h> + + mixed queue->read(); + +DESCRIPTION + This function retreives a value from the queue. Values will be + returned in the order they were written. If there are no values + present in the queue the current thread will sleep until some other + thread writes a value to the queue. + +============================================================================ +NAME + size - return number of values in queue + +SYNTAX + #include <fifo.h> + + int queue->size(); + +DESCRIPTION + This function returns how many values are currently in the queue. + +============================================================================