From eb3c130e657d177d84e531469dc17080fbd44a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Wed, 9 Oct 1996 06:17:31 +0200 Subject: [PATCH] new documenation Rev: doc/precompiled/fifo:1.1 Rev: doc/precompiled/queue:1.1 --- doc/precompiled/fifo | 73 +++++++++++++++++++++++++++++++++++++++++++ doc/precompiled/queue | 56 +++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 doc/precompiled/fifo create mode 100644 doc/precompiled/queue diff --git a/doc/precompiled/fifo b/doc/precompiled/fifo new file mode 100644 index 0000000000..3d83d9f88d --- /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 0000000000..0778f80873 --- /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. + +============================================================================ -- GitLab