Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

sky (1411)

sky
  (email not shown publicly)

sky on IRC

Journal of sky (1411)

Tuesday May 01, 2001
04:03 AM

iThread::Queue

[ #121 ]
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.