On very quickly scheduled recurrent notifications, it was still possible for the wait time to become negative due to the passage of time - now the scheduler will only use the WaitOne() method when the remaining time until notification is positive
git-svn-id: file:///srv/devel/repo-conversion/nusu@147 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
		
							parent
							
								
									6b8362d57d
								
							
						
					
					
						commit
						d6ddf04f58
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -419,8 +419,10 @@ namespace Nuclex.Support.Scheduling {
 | 
			
		|||
          this.notificationWaitEvent.WaitOne();
 | 
			
		||||
        } else {
 | 
			
		||||
          long remainingTicks = nextDueNotification.NextDueTicks - this.timeSource.Ticks;
 | 
			
		||||
          if(remainingTicks > 0) {
 | 
			
		||||
            this.timeSource.WaitOne(this.notificationWaitEvent, remainingTicks);
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Have we been woken up because the Scheduler is being disposed?
 | 
			
		||||
        if(this.endRequested) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue