Implement new control API - #489
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //:license-checkStatus: Click to expand output |
| LM_LOG_DEBUG() << "Graphs initialized"; | ||
| } | ||
|
|
||
| void ProcessGroupManager::offerService() |
There was a problem hiding this comment.
I would recommend to eventually move all the interaction handling with lmcontrol service and all the mw::com parts to a separate class and create an interface for the ProcessGroupManager class.
In case we want to exchange the underlying IPC implementation at some point it will be good if this is cleanly isolated in the code and e.g. the ProcessGroupManager does not need to be changed.
| auto instance = std::move(instance_result).value(); | ||
|
|
||
| const auto register_result = instance.activate_run_target.RegisterHandler( | ||
| [this](ActivateRunTargetResponse& response, const ActivateRunTargetRequest& request) { |
There was a problem hiding this comment.
I think all the code in Graph should only run on main thread to avoid the complexity of multi threaded code there.
One idea would be to post an event in the event queue when a request arrives so it can be processed on the main thread.
Then the result can be provided back to some "control" class that implements the mw::com communication
This checks for a specific list of open files, which is not possible to test when we are using `mw::com`, whose implementation we do not control.
This pull request adapts the launch manager (and tests) to use the new control API based on
mw::com, and removes the old API.Fixes #481.