cleanup(userspace/falco): always set queue capacity and use largest long as default for unbounded

Co-authored-by: Andrea Terzolo <andreaterzolo3@gmail.com>
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
This commit is contained in:
Melissa Kilby
2023-08-25 18:41:55 +00:00
committed by poiana
parent 1e94598eca
commit a61f24066f
4 changed files with 12 additions and 9 deletions

View File

@@ -21,7 +21,11 @@ limitations under the License.
#include <mutex>
#include <sinsp.h>
#define DEFAULT_OUTPUTS_QUEUE_CAPACITY 0
//
// equivalent to an "unbounded queue" in TBB terms or largest long value
// https://github.com/oneapi-src/oneTBB/blob/b2474bfc636937052d05daf8b3f4d6b76e20273a/include/oneapi/tbb/concurrent_queue.h#L554
//
#define DEFAULT_OUTPUTS_QUEUE_CAPACITY std::ptrdiff_t(~size_t(0) / 2)
//
// Most falco_* classes can throw exceptions. Unless directly related