| parrotcode: Threadsafe Queue | |
| Contents | PMCs |

classes/tqueue.pmc - Threadsafe Queue

Threadsafe queue class for inter thread communication. If you have an unthreaded program then please use a PerlArray.
new P0, .TQueue
push P0, some
new P2, .ParrotThread
...
and in other thread (at least, when shared PMCs work :)
shift P1, P0
Note: The TQueue must always be emptied before program exit.

void init()PMC *clone()void mark()void destroy()INTVAL defined()INTVAL get_integer()INTVAL elements()void push_pmc(PMC *item)*item to the end of the queue.PMC *shift_pmc()
2003.12.19 leo initial rev.
|
|
|