Added quaternion serialization; serialization methods now always work on references to improve performance; removed dead code from CygonRectanglePacker; improved commenting on Progression framework

git-svn-id: file:///srv/devel/repo-conversion/nusu@29 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
Markus Ewald 2007-06-12 19:15:55 +00:00
parent 979e6328fb
commit 991fab9721
4 changed files with 42 additions and 14 deletions

View file

@ -81,6 +81,15 @@ 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
// 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.
if(this.progress != 1.0f) {
this.progress = 1.0f;
progressUpdateCallback();
@ -94,11 +103,10 @@ namespace Nuclex.Support.Tracking {
/// <param name="e">Contains the updated progress</param>
private void asyncProgressUpdated(object sender, ProgressUpdateEventArgs e) {
this.progress = e.Progress;
this.progressUpdateCallback();
}
/// <summary>Unscribes from all events of the observed progression</summary>
/// <summary>Unsubscribes from all events of the observed progression</summary>
private void asyncDisconnectEvents() {
// Make use of the double check locking idiom to avoid the costly lock when