Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ordered aspect doesn't work #179

Closed
ghost opened this issue Mar 13, 2018 · 1 comment
Closed

Ordered aspect doesn't work #179

ghost opened this issue Mar 13, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 13, 2018

EDIT: It will be fixed by: #180

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Output is thrown at the console at the end of all jobs.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
https://i.imgur.com/bXKco8j.mp4

1..10|Start-RSJob {
    if (1 -BAND $_){
        "First ($_)"
    }Else{
        Start-sleep -seconds 2
        "Last ($_)"
    }
}|Wait-RSJob|Receive-RSJob|ForEach{"I am $($_)"}

What is the expected behavior?
Output should be ordered:
Pic

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?
PSVersion 5.1.17618.1000
PSEdition Desktop
BuildVersion 10.0.17618.1000

@MVKozlov
Copy link
Contributor

the right word sould be "ordered". there is no problem with streaming in this example :)

but, yes, since my changes to Get-RSJob (for speedup)
jobs ordered by start time, (by id) , not finishing time

If this is undesired change, it can be fixed by switching $PoshRS_Jobs from list to hash
btw, may be this will be another speedup for long job lists
if @proxb agree that it should be fixed I can try to prepare PR

@ghost ghost changed the title Streaming aspect doesn't work Ordered aspect doesn't work Dec 4, 2018
@ghost ghost closed this as completed Oct 21, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant