mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 02:15:10 +00:00 
			
		
		
		
	asyncio doc: rewrite the callback hello world to use call_soon() instead of a
direct call.
This commit is contained in:
		
							parent
							
								
									b69d62dcac
								
							
						
					
					
						commit
						dbd8950b28
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -348,7 +348,7 @@ Print ``Hello World`` every two seconds, using a callback:: | ||||||
|         loop.call_later(2, print_and_repeat, loop) |         loop.call_later(2, print_and_repeat, loop) | ||||||
| 
 | 
 | ||||||
|     loop = asyncio.get_event_loop() |     loop = asyncio.get_event_loop() | ||||||
|     print_and_repeat(loop) |     loop.call_soon(print_and_repeat, loop) | ||||||
|     loop.run_forever() |     loop.run_forever() | ||||||
| 
 | 
 | ||||||
| .. seealso:: | .. seealso:: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner