Skip to content

Commit

Permalink
made pool optional in bedrock module
Browse files Browse the repository at this point in the history
  • Loading branch information
mdorier committed Sep 4, 2024
1 parent cd82145 commit f2d14ae
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/bedrock-module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<thallium::pool>();
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<thallium::pool>();
} else {
pool = args.engine.get_handler_pool();
}

flock_group_view_t initial_view = FLOCK_GROUP_VIEW_INITIALIZER;

Expand Down Expand Up @@ -192,7 +198,7 @@ class FlockComponent : public bedrock::AbstractComponent {
GetDependencies(const bedrock::ComponentArgs& args) {
(void)args;
std::vector<bedrock::Dependency> deps = {
{ "pool", "pool", true, false, false }
{ "pool", "pool", false, false, false }
};
return deps;
}
Expand Down

0 comments on commit f2d14ae

Please sign in to comment.