Skip to content
This repository was archived by the owner on Nov 17, 2021. It is now read-only.
This repository was archived by the owner on Nov 17, 2021. It is now read-only.

Job related exception #20

@markekraus

Description

@markekraus

I'm trying run the following code blocks

@(
    Start-Job {Start-sleep -Seconds 2; Get-Date}
    Start-Job {Start-sleep -Seconds 3; Get-Date}
) | Wait-Job | Receive-Job
$Jobs = @(
    Start-Job {Start-sleep -Seconds 2; Get-Date}
    Start-Job {Start-sleep -Seconds 3; Get-Date}
) 
$Jobs | Wait-Job | Receive-Job
$Job1 = Start-Job {Start-sleep -Seconds 2; Get-Date}
$Job2 = Start-Job {Start-sleep -Seconds 3; Get-Date}
Start-sleep -Seconds 5
Get-Job | Receive-Job

Or any kind of combination to start a job and receive it. I get the following exception for all of them:

PowerShell-Kernel : Object reference not set to an instance of an object.

   at Jupyter.PowerShell.PowerShellEngine.LogErrors(ExecutionResult result, PipelineReader`1 errorStream) in C:\Users\Joel\Projects\Jupyter\Jupyter-PowerShell\Source\PowerShell-Kernel\PowerShellEngine.cs:line 179
   at Jupyter.PowerShell.PowerShellEngine.Execute(String script) in C:\Users\Joel\Projects\Jupyter\Jupyter-PowerShell\Source\PowerShell-Kernel\PowerShellEngine.cs:line 75

Note: My purpose for using jobs in the jupyter notebook was to demonstrate different methods of parallel and concurrent programming in PowerShell with pretty markdown all around it. Not trying to do anything real fancy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions