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

Worker child process title #44

Open
alexgreenland opened this issue Dec 20, 2018 · 3 comments
Open

Worker child process title #44

alexgreenland opened this issue Dec 20, 2018 · 3 comments

Comments

@alexgreenland
Copy link

Is there a way of specifying the name of the child processes spawned by the pool? I want them to have different titles from the parent process.

@josdejong
Copy link
Owner

The child processes don't get a name. Would be interesting to give them a distinctive name.

Anyone interested in looking into this?

@alexgreenland
Copy link
Author

Been looking at this and it's prohibitively difficult — the child is in a separate process, a black box, so you can't change properties like process.title on it.

Unless there's an API that Workerpool provides to specify the name to the child, I don't think there's a way to do it — and at that point, the child might as well decide its own name, so I don't see the point. The other thing I was thinking was Workerpool could spawn its own intermediary script which itself spawns the worker scripts, but that sounds like bloat to me.

As long as users provide specific worker scripts to Workerpool separate to the entry, then you have control.

@josdejong
Copy link
Owner

Wouldn't it be possible to use message passing to the worker which then in turn sets its own process.title? by default the WorkderPool could give them some default naming like "workerpool-child-3" or something. I guess the main purpose is to make the childs recognizable?

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

2 participants