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

Added support for terminating a spawned worker if a timeout is reached #207

Merged
merged 2 commits into from
Oct 6, 2020

Conversation

amit777
Copy link
Contributor

@amit777 amit777 commented Oct 1, 2020

Hi, I found this lib because I was searching for a way to easily spawn a worker, but also be able to terminate it if a timeout is reached. The use case is that I want to time limit execution for certain operations.

I don't have any experience with the test frameworks in this lib, but if my pull request looks promising, I'm happy to learn and create a test spec. But only if you think this extra feature even belongs in parallel.js?

@amit777 amit777 mentioned this pull request Oct 1, 2020
Copy link
Member

@mathiasrw mathiasrw left a comment

Choose a reason for hiding this comment

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

Epic. Please also add a description of the new option in the readme file too.

@amit777
Copy link
Contributor Author

amit777 commented Oct 5, 2020

Thanks! I've added an update to the documentation. However, is it possible that the new timeout option will overwrite an environment variable that could be set in the Parallel constructor?

@mathiasrw
Copy link
Member

Thank you!

@mathiasrw mathiasrw merged commit 1dedd68 into parallel-js:master Oct 6, 2020
@mathiasrw
Copy link
Member

released as part of v1.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants