Fully implemented the ProgressionTracker and created some NMock-assisted unit tests for validating its proper functioning
git-svn-id: file:///srv/devel/repo-conversion/nusu@35 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
344e5fac53
commit
850db0cded
6 changed files with 472 additions and 29 deletions
|
@ -82,14 +82,13 @@ namespace Nuclex.Support.Tracking {
|
|||
asyncDisconnectEvents(); // We don't need those anymore!
|
||||
|
||||
// If the progress hasn't reached 1.0 yet, make a fake report so that even
|
||||
// when a progression doesn't report any progress at all, the set of queue
|
||||
// when a progression doesn't report any progress at all, the set or queue
|
||||
// owning us will have a percentage of progressions completed.
|
||||
//
|
||||
// There is the possibility of a race condition here, as a final progress
|
||||
// report could have been generated by some other thread that was preempted
|
||||
// by this thread reporting the end of the progression. This is not a problem,
|
||||
// however, since the progress is inteded only for informal purposes and
|
||||
// not to be used for controlling program flow.
|
||||
// report could have been generated by a thread running the progression
|
||||
// that was preempted by this thread. This would cause the progress to
|
||||
// jump to 1.0 and then back to whatever the waiting thread will report.
|
||||
if(this.progress != 1.0f) {
|
||||
this.progress = 1.0f;
|
||||
progressUpdateCallback();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue