Opened 8 years ago

Closed 8 years ago

#10953 closed Bugs (fixed)

boost::lockfree:spsc_queue::consume_all returns bool instead of the number of elements consumed

Reported by: Ephraim Ofir <ephraimofir@…> Owned by: timblechmann
Milestone: To Be Determined Component: lockfree
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc:

Description

When using the compile_time_sized_ringbuffer version of spsc_queue::consume_all, the value returned is a bool (similar to the way consume_one works) instead of the number of elements consumed (similar to the way the runtime_sized_ringbuffer version works).

This also generates the following warning in VS2012:

boost/lockfree/spsc_queue.hpp(473): warning C4800: 'boost::lockfree::detail::ringbuffer_base<T>::size_t' : forcing value to bool 'true' or 'false' (performance warning)

Pull request with fix submitted.

Change History (1)

comment:1 by timblechmann, 8 years ago

Resolution: fixed
Status: newclosed

merged

Note: See TracTickets for help on using tickets.