mirror of
				https://github.com/ets-labs/python-dependency-injector.git
				synced 2025-10-31 07:57:43 +03:00 
			
		
		
		
	Add docs on provider async mode enabling
This commit is contained in:
		
							parent
							
								
									40ae522231
								
							
						
					
					
						commit
						4e4d4a7fb0
					
				|  | @ -15,3 +15,20 @@ Providers support asynchronous injections. | ||||||
|    :language: python |    :language: python | ||||||
|    :emphasize-lines: 26-29 |    :emphasize-lines: 26-29 | ||||||
|    :lines: 3- |    :lines: 3- | ||||||
|  | 
 | ||||||
|  | If provider has any awaitable injections it turns into async mode. In async mode provider always returns awaitable. | ||||||
|  | This causes a cascade effect: | ||||||
|  | 
 | ||||||
|  | .. code-block:: bash | ||||||
|  | 
 | ||||||
|  |    provider1()              <── Async mode enabled <──┐ | ||||||
|  |    │                                                  │ | ||||||
|  |    ├──> provider2()                                   │ | ||||||
|  |    │                                                  │ | ||||||
|  |    ├──> provider3()         <── Async mode enabled <──┤ | ||||||
|  |    │    │                                             │ | ||||||
|  |    │    └──> provider4()    <── Async provider ───────┘ | ||||||
|  |    │ | ||||||
|  |    └──> provider5() | ||||||
|  |         │ | ||||||
|  |         └──> provider6() | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user