iThread::Queue

sky on 2001-05-01T09:03:13

The queue now works, it is implmented in C and works using pthread_mutex and pthread_cond.

However I am begining to doubt that this is the correct approach because it doesn't solve the problem of sharing a variable between two threads
The current problem is that when the thread that put something on the queue goes out of scope it will null that SV on the queue.

It is interesting to note that Thread::Queue implments a Queue in pure perl using the thread semantic. Maybe that is a better approach, add in support for conditions and locks in perl, and then write iThread::Queue in pure perl.