Skip to content

Rewrite the serial discovery logic #382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 30, 2019
Merged

Rewrite the serial discovery logic #382

merged 1 commit into from
Aug 30, 2019

Conversation

masci
Copy link
Contributor

@masci masci commented Aug 30, 2019

This PR fixes some concurrency issues we faced when connecting multiple gRPC client to the same CLI daemon. We don't really know the root cause but the problems went away by making really atomic the execution of the external tool. With this PR, only one function is called by the clients, and this function is responsible for:

  • creating the command
  • launching the process
  • setting up the pipes
  • send and receive commands
  • closing the pipes
  • shutting down (or kill if needed) the process

The function operates within a mutex.

Copy link
Contributor

@rsora rsora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@masci masci merged commit 549b0fb into master Aug 30, 2019
@masci masci deleted the massi/list_sync branch August 30, 2019 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants