PaulHigin / PSThreadJob

A PowerShell module for running concurrent jobs based on threads rather than processes
MIT License
180 stars 18 forks source link

Information stream is not passed to output #4

Closed ajansveld closed 5 years ago

ajansveld commented 6 years ago

This does not generate output (substituting Start-Job does):

Start-ThreadJob {Write-Information "foo" -InformationAction Continue} | Receive-Job -Wait -AutoRemoveJob

Is this by design?

ajansveld commented 6 years ago

And perhaps related to this, using Write-Host in the script block sends the data to the output instead of the Information stream.

PaulHigin commented 6 years ago

Good catch. I actually wrote this a few years ago before information streams were added. The code should be modified to handle them.

PaulHigin commented 6 years ago

Changes merged. Thanks!

PaulHigin commented 6 years ago

Actually I had to revert this change because it causes .Net runtime errors on downlevel systems with v3 and v4 versions of PowerShell. It looks like we would need to build different binaries to target different platform versions, and I prefer not to do that at least not yet.

ajansveld commented 5 years ago

This was fixed in #30.