Skip to content

Latest commit

 

History

History
211 lines (164 loc) · 4.39 KB

Wait-Thread.md

File metadata and controls

211 lines (164 loc) · 4.39 KB
external help file Module Name online version schema
PsRunspace-help.xml
PsRunspace
2.0.0

Wait-Thread

SYNOPSIS

Waits for a thread to be completed so the results can be returned, or for a timeout to be reached

SYNTAX

Wait-Thread [-Thread] <PSObject[]> [[-Threads] <Int32>] [[-SleepTimer] <Int32>] [[-Timeout] <Int32>] [-Dispose]
 [[-DebugOutputStream] <String>] [[-TodaysHostname] <String>] [[-WhoAmI] <String>] [[-LogBuffer] <Hashtable>]
 [[-ProgressParentId] <Int32>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Used by Split-Thread

EXAMPLES

Example 1

PS C:\> {{ Add example code here }}

{{ Add example description here }}

PARAMETERS

-DebugOutputStream

Will be sent to the Type parameter of Write-LogMsg in the PsLogMessage module

Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: Silent
Accept pipeline input: False
Accept wildcard characters: False

-Dispose

Dispose of the thread when it is finished

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-LogBuffer

Log messages which have not yet been written to disk

Type: System.Collections.Hashtable
Parameter Sets: (All)
Aliases:

Required: False
Position: 8
Default value: $Global:LogMessages
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: System.Management.Automation.ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressParentId

ID of the parent progress bar under which to show progres

Type: System.Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 9
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-SleepTimer

Milliseconds to wait between cycles of the loop that checks threads for completion

Type: System.Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: 200
Accept pipeline input: False
Accept wildcard characters: False

-Thread

Threads to wait for

Type: System.Management.Automation.PSObject[]
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Threads

Maximum number of concurrent threads that are allowed (used only for progress display)

Type: System.Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: 20
Accept pipeline input: False
Accept wildcard characters: False

-Timeout

Seconds to wait without receiving any new results before giving up and stopping all remaining threads

Type: System.Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: 120
Accept pipeline input: False
Accept wildcard characters: False

-TodaysHostname

Hostname to record in log messages (can be passed to Write-LogMsg as a parameter to avoid calling an external process)

Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: (HOSTNAME.EXE)
Accept pipeline input: False
Accept wildcard characters: False

-WhoAmI

Username to record in log messages (can be passed to Write-LogMsg as a parameter to avoid calling an external process)

Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Default value: (whoami.EXE)
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

[PSCustomObject]$Thread

OUTPUTS

Outputs the specified output streams from the threads

NOTES

RELATED LINKS