mirror of
				https://github.com/YosysHQ/sby.git
				synced 2025-10-31 04:52:30 +00:00 
			
		
		
		
	Prevent the timeout callback from running if all tasks completed.
Signed-off-by: William D. Jones <thor0505@comcast.net>
This commit is contained in:
		
							parent
							
								
									b6007aa68c
								
							
						
					
					
						commit
						a320462976
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -263,7 +263,8 @@ class SbyJob: | |||
|     async def task_poller(self): | ||||
|         if self.opt_timeout is not None: | ||||
|             timer_fut = asyncio.ensure_future(self.timekeeper()) | ||||
|             timer_fut.add_done_callback(partial(SbyJob.timeout, self)) | ||||
|             done_cb = partial(SbyJob.timeout, self) | ||||
|             timer_fut.add_done_callback(done_cb) | ||||
| 
 | ||||
|         for task in self.tasks_pending: | ||||
|             await task.maybe_spawn() | ||||
|  | @ -280,6 +281,7 @@ class SbyJob: | |||
|                     await task.shutdown_and_notify() | ||||
| 
 | ||||
|         if self.opt_timeout is not None: | ||||
|             timer_fut.remove_done_callback(done_cb) | ||||
|             timer_fut.cancel() | ||||
| 
 | ||||
|         # Required on Windows. I am unsure why, but subprocesses that were | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue