From d237b27b9a0f00d242a60ead5a26e22921882f32 Mon Sep 17 00:00:00 2001 From: freedbygrace Date: Fri, 20 Oct 2023 13:59:19 -0400 Subject: [PATCH] Update README.md --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 024fd62..ecaffcf 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,12 @@ See the fully working examples below. ## EXAMPLES -### Example 1: EXAMPLE 1 +### Example 1 + -``` Create a runspace -``` +``` [ScriptBlock]$RunspaceDefinition = { Param ( @@ -83,12 +83,12 @@ $InvokePSThreadParameters = New-Object -TypeName 'System.Collections.Specialized $InvokePSThreadResult = Invoke-PSThread @InvokePSThreadParameters Write-Output -InputObject ($InvokePSThreadResult) +``` - -### Example 2: EXAMPLE 2 +### Example 2 Create a runspace pool, submit all jobs to the pool, and the pool will manage their execution. @@ -151,7 +151,7 @@ Write-Output -InputObject ($InvokePSThreadResult) -### Example 3: EXAMPLE 3 +### Example 3 Create a runspace pool, submit all jobs to the pool, and the pool will manage their execution. The function will be executed a second time to wait until all jobs have been completed, return their output, and cleanup. @@ -637,4 +637,3 @@ Any useful tidbits [] (https://xkln.net/blog/multithreading-in-powershell--running-a-specific-number-of-threads/) [] (https://markw.dev/#:~:text=There%20are%20two%20ways%20we,other%20is%20by%20using%20splatting.&text=The%20important%20part%20here%20is,plural)%20instead%20of%20AddParameter()%20.) -