Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Job strangeness when progress: and title: are both updated #2815
I'm using Job to show progress bars on my code and I sometimes find that the message is "off by one" from the progress. I created a MWE below that reproduces the bug in Pharo 7 on Windows and Unix (WSL):
| myColl | myColl := 1 to: 3. [ :job | myColl do: [ :e | job progress: e/(myColl size); title: 'waiting ' , e asString. (Delay forSeconds: 3) wait ] ] asJob run
What I see is
So, from this I see a bug that the first message never appears and the last message and progress (3/3) never appears.
The reason I'm interested in using both title: and progress: is that I have jobs with several long steps (cloning a git, creating metamodels, etc.) and I want to show progress along with a feedback for which step is running. This seems like a bug, but maybe I'm not using Job appropriately?