Skip to content
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

Wait for background worker start #8

Open
mkindahl opened this issue Dec 13, 2022 · 0 comments
Open

Wait for background worker start #8

mkindahl opened this issue Dec 13, 2022 · 0 comments

Comments

@mkindahl
Copy link
Collaborator

Situation

Currently, the worker_launch function will register the background worker and wait for the process to start using WaitForBackgroundWorkerStartup.

Problem

The procedure above do not wait for the background worker to bind to the port and start listening on it, which means that if any of these fail, there is no indication to the session that issues the command that this failure happened. This complicates testing and also make the usability worse since it can look like the system started the background workers, but they actually exited quite soon after as a result of an error.

Solution

  • Do not return from the worker_launch function unless the background worker has properly bound the ports and has started listening on the socket.
  • Pass back any errors occurring before this point is reached to the dispatching session and print this as an error.
@mkindahl mkindahl added enhancement New feature or request usability and removed enhancement New feature or request labels Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant