Skip to content

Commit 9eeaf9f

Browse files
committed
updating docs
1 parent 32302b3 commit 9eeaf9f

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ PS \> 0..10 | Invoke-Parallel { $_; Start-Sleep 5 } -TimeoutSeconds 2
9191
# Invoke-Parallel: Timeout has been reached.
9292
```
9393

94-
### `$using:` Support
94+
### [`$using:`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_language_keywords?view=powershell-7.4) Support
9595

96-
Same as `ForEach-Object -Parallel` you can use the `$using:` keyword to pass-in variables to the parallel invocations.
96+
Same as `ForEach-Object -Parallel` you can use the `$using:` scope modifier to pass-in variables to the parallel invocations.
9797

9898
```powershell
9999
$message = 'world!'

docs/en-US/Invoke-Parallel.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ $message = 'Hello world from '
5454
} -Variables @{ message = $message }
5555
```
5656

57-
[`-Variables`](#-variables) specifies a hashtable with key / value pairs of variables to pass-in to the parallel scope. The hashtable keys defines the name for passed-in variables. This parameter is an alternative for the `$using:` keyword.
57+
[`-Variables`](#-variables) specifies a hashtable with key / value pairs of variables to pass-in to the parallel scope. The hashtable keys defines the name for passed-in variables. This parameter is an alternative for the `$using:` scope modifier.
5858

59-
### Example 3: Adding to a single thread safe instance with `$using:` keyword
59+
### Example 3: Adding to a single thread safe instance with `$using:` scope modifier
6060

6161
```powershell
6262
$dict = [System.Collections.Concurrent.ConcurrentDictionary[int, object]]::new()
@@ -238,7 +238,7 @@ The hashtable keys defines the name for passed-in variables.
238238

239239
> [!TIP]
240240
>
241-
> This parameter is an alternative for the `$using:` keyword.
241+
> This parameter is an alternative for the [`$using:` scope modifier](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_scopes?view=powershell-7.4#scope-modifiers).
242242

243243
```yaml
244244
Type: Hashtable

tests/PSParallelPipeline.tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ Describe PSParallelPipeline {
156156
}
157157
}
158158

159-
Context '$using: keyword Support' {
160-
It 'Allows passed-in variables through $using: keyword' {
159+
Context '$using: scope modifier Support' {
160+
It 'Allows passed-in variables through the $using: scope modifier' {
161161
$message = 'Hello world from {0:D2}'
162162
$items = 0..10 | Invoke-Parallel { $using:message -f $_ } |
163163
Sort-Object
@@ -185,7 +185,7 @@ Describe PSParallelPipeline {
185185
}
186186

187187
Context 'Script Block Assertions' {
188-
It 'Should throw on passed-in Script Block via $using: keyword' {
188+
It 'Should throw on passed-in Script Block via $using: scope modifier' {
189189
{ $sb = { }; 1..1 | Invoke-Parallel { $using:sb } } |
190190
Should -Throw -ExceptionType ([PSArgumentException])
191191
}

0 commit comments

Comments
 (0)