mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
17 lines
483 B
PowerShell
17 lines
483 B
PowerShell
function Start-IcingaThread()
|
|
{
|
|
param(
|
|
[string]$Thread
|
|
);
|
|
|
|
if ([string]::IsNullOrEmpty($Thread)) {
|
|
return;
|
|
}
|
|
|
|
if ($Global:Icinga.Public.Threads.ContainsKey($Thread)) {
|
|
if ($Global:Icinga.Public.Threads[$Thread].Started -eq $FALSE) {
|
|
$Global:Icinga.Public.Threads[$Thread].Handle = $Global:Icinga.Public.Threads[$Thread].Shell.BeginInvoke();
|
|
$Global:Icinga.Public.Threads[$Thread].Started = $TRUE;
|
|
}
|
|
}
|
|
}
|