This upload includes all files to build the ThreadJob module in Visual Studio as a PowerShell module, as well as Pester basic tests. Most files are auto-generated by Visual Studio and the important files to look at are:
ThreadJob is a simple module that consists of a single cmdlet (Start-ThreadJob). This cmdlet is intended to mirror the existing Start-Job cmdlet, with the difference that the job is run in a separate runspace/thread rather than in a separate process. So it is lighter weight, faster (since it doesn't use PSRP), and returns "live" objects instead of re-hydrated serialized objects.
One major difference is that there is now a -ThrottleLimit parameter to limit the number of concurrent threads running, along with a queue for jobs waiting to run.
The 'using' keyword is not yet supported because the infrastructure to support this is currently internal access in PowerShell and needs to be made public for this module to use it.
This upload includes all files to build the ThreadJob module in Visual Studio as a PowerShell module, as well as Pester basic tests. Most files are auto-generated by Visual Studio and the important files to look at are:
ThreadJob is a simple module that consists of a single cmdlet (Start-ThreadJob). This cmdlet is intended to mirror the existing Start-Job cmdlet, with the difference that the job is run in a separate runspace/thread rather than in a separate process. So it is lighter weight, faster (since it doesn't use PSRP), and returns "live" objects instead of re-hydrated serialized objects.
One major difference is that there is now a -ThrottleLimit parameter to limit the number of concurrent threads running, along with a queue for jobs waiting to run.
The 'using' keyword is not yet supported because the infrastructure to support this is currently internal access in PowerShell and needs to be made public for this module to use it.