Search

Runspace or Runspacepool timeout by Cookie.Monster

Active

2
0
Sign in
to vote
Type: Suggestion
ID: 773243
Opened: 12/2/2012 4:13:12 PM
Access Restriction: Public
0
Workaround(s)
My apologies for not using the correct terms or concepts. My basic goal is to provide functionality that would enable timeouts for runspaces in a runspacepool.

I tried to add a timeout to Tome T.'s Foreach-Parallel function but was unsuccessful - defining a 'start time' when a runspace is defined is inaccurate, as the actual runspace is queued up and may not start when this property is defined. Details here: http://gallery.technet.microsoft.com/Foreach-Parallel-Parallel-a8f3d22b

Boe Prox suggested using nested runspaces. This allows for accurate timeouts unlike the above method, but severely impacts performance, the main motivation for using runspacepools in the first place.
Details (expand)
How often does this happen?
Always Happens
Have you seen this problem before in this product?
Yes, this happens in all previous versions
Reproduction Steps
Not an error. Trying to add a timeout to runspaces in a runspace pool. For example, in Tome T's Foreach-Parallel function:

http://powertoe.wordpress.com/2012/05/03/foreach-parallel/
Expected Results
I would expect that I could define a runspacepool timeout when creating the runspacepool:
[Runspacefactory]::CreateRunspacePool(...)

At the very least, I would expect a property for each Runspace that defines the time that runspace began executing, allowing for manual calculation of a timeout.
File Attachments
0 attachments
Sign in to post a comment.
Sign in to post a workaround.