From f2d14aef00e0afbf07e3980d8241e148d406aa64 Mon Sep 17 00:00:00 2001 From: Matthieu Dorier Date: Wed, 4 Sep 2024 17:20:03 +0100 Subject: [PATCH] made pool optional in bedrock module --- src/bedrock-module.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/bedrock-module.cpp b/src/bedrock-module.cpp index 380e4ad..65cf253 100644 --- a/src/bedrock-module.cpp +++ b/src/bedrock-module.cpp @@ -31,7 +31,13 @@ class FlockComponent : public bedrock::AbstractComponent { flock_return_t ret; auto mid = args.engine.get_margo_instance(); auto provider_id = args.provider_id; - auto pool = args.dependencies.find("pool")->second[0]->getHandle(); + auto pool_dep_it = args.dependencies.find("pool"); + thallium::pool pool; + if(pool_dep_it != args.dependencies.end()) { + pool = pool_dep_it->second[0]->getHandle(); + } else { + pool = args.engine.get_handler_pool(); + } flock_group_view_t initial_view = FLOCK_GROUP_VIEW_INITIALIZER; @@ -192,7 +198,7 @@ class FlockComponent : public bedrock::AbstractComponent { GetDependencies(const bedrock::ComponentArgs& args) { (void)args; std::vector deps = { - { "pool", "pool", true, false, false } + { "pool", "pool", false, false, false } }; return deps; }