Real-Serious-Games / C-Sharp-Promise

Promises library for C# for management of asynchronous operations.
MIT License
1.19k stars 149 forks source link

Make Promise.Sequence report progress. #72

Closed alonsohki closed 6 years ago

alonsohki commented 6 years ago

Promise.Sequence was not reporting progress. Now it will report an overall progress for the whole sequence going from 0 to 1, plus all the intermediate values inbetween.

This is, if you have 4 promises reporting their own progress (from 0 to 1) in a sequence, the progress that the Promise.Sequence call will report is: Promise1: [0, 0.25] Promise2: [0.25, 0.5] Promise3: [0.5, 0.75] Promise4: [0.75, 1]

RoryDungan commented 6 years ago

Looks good! I just added one comment for something that I think is an issue with your code, but once that's resolved I'll be happy to merge.