Skip to content

Instantly share code, notes, and snippets.

@bohdanszymanik
Created December 22, 2016 20:43
Show Gist options
  • Select an option

  • Save bohdanszymanik/ac8cee4959e2a1ce9e96e7df8907a684 to your computer and use it in GitHub Desktop.

Select an option

Save bohdanszymanik/ac8cee4959e2a1ce9e96e7df8907a684 to your computer and use it in GitHub Desktop.
Very cool - Split-PipeLine is a very handy tool!
1..10 | . {process{ $_; sleep 1 }}
function giveMeTwo {2}
$log = "Barney"
$src = "c:\temp"
1..10 | Split-Pipeline -Count 2 -Variable log,src -Function giveMeTwo {process{ write-host "Value: $_ from thread $([System.Threading.Thread]::CurrentThread.ManagedThreadId) for $log, $src"
write-host $(giveMeTwo)
sleep 1 }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment