Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,10 @@
|
|||
$Strings = "Enjoy","Rosetta","Code"
|
||||
|
||||
$SB = {param($String)Write-Output $String}
|
||||
|
||||
foreach($String in $Strings) {
|
||||
Start-Job -ScriptBlock $SB -ArgumentList $String | Out-Null
|
||||
}
|
||||
|
||||
Get-Job | Wait-Job | Receive-Job
|
||||
Get-Job | Remove-Job
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
$Strings = "Enjoy","Rosetta","Code"
|
||||
|
||||
$SB = {param($String)Write-Output $String}
|
||||
|
||||
$Pool = [RunspaceFactory]::CreateRunspacePool(1, 3)
|
||||
$Pool.ApartmentState = "STA"
|
||||
$Pool.Open()
|
||||
foreach ($String in $Strings) {
|
||||
$Pipeline = [System.Management.Automation.PowerShell]::create()
|
||||
$Pipeline.RunspacePool = $Pool
|
||||
[void]$Pipeline.AddScript($SB).AddArgument($String)
|
||||
$AsyncHandle = $Pipeline.BeginInvoke()
|
||||
$Pipeline.EndInvoke($AsyncHandle)
|
||||
$Pipeline.Dispose()
|
||||
}
|
||||
$Pool.Close()
|
||||
Loading…
Add table
Add a link
Reference in a new issue