forked from Badgerati/Pode
-
Notifications
You must be signed in to change notification settings - Fork 0
New PodeSemaphore
mdaneri edited this page Mar 10, 2025
·
1 revision
external help file: Pode-help.xml Module Name: Pode online version: PodeType: Threading schema: 2.0.0
Create a new Semaphore.
New-PodeSemaphore [-Name] <String> [[-Count] <Int32>] [[-Scope] <String>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
Create a new Semaphore.
New-PodeSemaphore -Name 'SelfSemaphore'
New-PodeSemaphore -Name 'LocalSemaphore' -Scope Local
New-PodeSemaphore -Name 'GlobalSemaphore' -Count 3 -Scope Global
The number of threads to allow a hold on the Semaphore. (Default: 1)
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: 1
Accept pipeline input: False
Accept wildcard characters: False
The Name of the Semaphore.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The Scope of the Semaphore, can be either Self, Local, or Global. (Default: Self) Self: The current process, or child processes. Local: All processes for the current login session on Windows, or the the same as Self on Unix. Global: All processes on the system, across every session.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: Self
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
sss
x