QUEUES (located in \TOOLKIT\SAMPLES\OS2\QUEUES) demonstrates interprocess communications (IPC) using the 32-bit queue component. It consists of two executable programs:
Creates an IPC queue; a named, shared-memory buffer for queue elements; and a shared, named, mutex (mutual exclusive) semaphore. After initializing the queue, SVRQUEUE starts a thread to read from the queue, prints the contents of the messages read from the queue, and terminates at the user's request.
Opens the queue and accesses the shared-memory element buffer and mutex semaphore, and starts a thread to write to the queue. CLIQUEUE requests a string of data from the user, allocates a shared-memory element from the buffer, puts the string in the shared-memory element, and then uses an event semaphore to direct the thread to write the element to the queue. CLIQUEUE terminates at the user's request.