mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	parallel: Add missing annotation.
This commit is contained in:
		@@ -12,6 +12,7 @@ def run_parallel(job, data, threads=6):
 | 
			
		||||
    pids = {} # type: Dict[int, Any]
 | 
			
		||||
 | 
			
		||||
    def wait_for_one():
 | 
			
		||||
        # type: () -> Tuple[int, Any]
 | 
			
		||||
        while True:
 | 
			
		||||
            try:
 | 
			
		||||
                (pid, status) = os.wait()
 | 
			
		||||
@@ -58,6 +59,7 @@ if __name__ == "__main__":
 | 
			
		||||
    jobs = [10, 19, 18, 6, 14, 12, 8, 2, 1, 13, 3, 17, 9, 11, 5, 16, 7, 15, 4]
 | 
			
		||||
    expected_output = [6, 10, 12, 2, 1, 14, 8, 3, 18, 19, 5, 9, 13, 11, 4, 7, 17, 16, 15]
 | 
			
		||||
    def wait_and_print(x):
 | 
			
		||||
        # type: (int) -> int
 | 
			
		||||
        time.sleep(x * 0.1)
 | 
			
		||||
        return 0
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user