Subject: Re: [boost] [lockfree] how many items are queued?
From: Oliver Kowalke (k-oli_at_[hidden])
Date: 2009-09-04 02:35:15
> hi oliver,
> > lockfree.fifo provides the info if the queue is empty or not.
> it is mainly done as debugging help, but it is not supposed to be used
> in concurrent code ...
Because this function is available I thought it is safe to used it. What are the reasons that it is not supposed to be used?
> > is it possible to provide a function std::size_t size() const -
> returning how many items are queued at a specific timepoint?
> i don't really want to add more functions to the api, that are not
> thread-safe ... would this workaround fit your needs?
I plan to use boost.lockfree in boost.task - the one-lock and two-lock queues provide size() returning how many items are queued. I think I'll drop this function so lockfree-fifo/stack will fit.
-- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk