Add contract to Channel.consumeAll to force the input buffer to be empty.
This commit is contained in:
parent
c21e1aa06d
commit
3503001ec6
|
@ -84,7 +84,8 @@ struct Channel(T, size_t buffer_size) {
|
||||||
avaiable, `dst` will be left untouched and `false` is returned.
|
avaiable, `dst` will be left untouched and `false` is returned.
|
||||||
*/
|
*/
|
||||||
bool consumeAll(ref FixedRingBuffer!(T, buffer_size) dst)
|
bool consumeAll(ref FixedRingBuffer!(T, buffer_size) dst)
|
||||||
{ return m_impl.consumeAll(dst); }
|
in { assert(dst.empty); }
|
||||||
|
body { return m_impl.consumeAll(dst); }
|
||||||
|
|
||||||
/** Enqueues an element.
|
/** Enqueues an element.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue