diff options
Diffstat (limited to 'include/salticidae/buffer.h')
-rw-r--r-- | include/salticidae/buffer.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/salticidae/buffer.h b/include/salticidae/buffer.h index 3f415c9..2324d8b 100644 --- a/include/salticidae/buffer.h +++ b/include/salticidae/buffer.h @@ -131,7 +131,9 @@ struct MPSCWriteBuffer { } void push(bytearray_t &&data) { - buffer.enqueue(buffer_entry_t(std::move(data))); + buffer_entry_t d(std::move(data)); + // TODO: better bounded buffer impl + while (!buffer.try_enqueue(d)) {} } bytearray_t move_pop() { |