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

Request: Implement 'BeginStop' into Stop-RSJob #193

Open
gwpelletier opened this issue Sep 18, 2018 · 0 comments
Open

Request: Implement 'BeginStop' into Stop-RSJob #193

gwpelletier opened this issue Sep 18, 2018 · 0 comments

Comments

@gwpelletier
Copy link

gwpelletier commented Sep 18, 2018

Feature request: Implement "BeginStop" asynchronous solution instead of current "Stop" solution. Stop is Synchronous and can take a long time to shutdown concurrent threads, especially if there are a bunch to shutdown.

Not a bug, just a request: When passing jobs to Stop-RSJob, use the asynchronous solution "BeginStop" instead of "Stop", then monitor all jobs until stopped. Once done, return out of Stop-RSJob

Reason for change: Using BeginStop will result in faster shutting down of threads as they will all start shutting down at the same time. This is also helpful from preventing pending jobs from starting, which looks like could happen.

BeginStop returns an Async handle that will need to be monitored for completion, but all handles can be monitored until Handle.IsCompleted is true.

MVKozlov added a commit to MVKozlov/PoshRSJob that referenced this issue Dec 27, 2018
Move completed job data receiving into private function
give Receive-RSJob a chance to receive data (there was race condition possible)
Implemented proxb#193
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

No branches or pull requests

1 participant