Hi,

I recently had the problem that I needed a queue for results from worker
threads while also needing to select on sockets / fds. One (bad)
soultion would have been to select with a short timeout and then check
the queue for empty. My solution was to add a binding for

        int eventfd(unsigned int initval, int flags);

and write a new FDQueue module, based on Queue, using a signalfd to
signal or wait for entries. The FDQueue then has a Unix.file_descr that
one can include in the select call.

Now I'm wondering if I'm the only one that finds this usefull or if it
would make sense to seperate that from my program and package it
seperately for a wider audience.

Comments?

MfG
        Goswin


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to