Skip to content

Commit

Permalink
[control-plane] Add callback call for invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
mcopik committed Aug 8, 2023
1 parent f569d61 commit 1c5ebd3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion control-plane/src/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,17 @@ namespace praas::control_plane {

spdlog::info("Allocated process {}", name);
process->set_handle(std::move(instance));

// Avoid a race condition.
// Created callback can be called by process connection, or by
// the backend returning information.
// We wait until both information are provided.
process->created_callback(std::nullopt);

{
write_lock_t lock(_controlplane_mutex);
_controlplane_processes.emplace_back(process);
}
// callback(process, std::nullopt);
} else {

spdlog::error("Failed to allocate process!");
Expand Down

0 comments on commit 1c5ebd3

Please sign in to comment.