File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -173,13 +173,15 @@ async def effect(stop: asyncio.Event) -> None:
173173def use_async_effect (
174174 function : None = None ,
175175 dependencies : Sequence [Any ] | ellipsis | None = ...,
176+ shutdown_timeout : float = 0.1 ,
176177) -> Callable [[_EffectApplyFunc ], None ]: ...
177178
178179
179180@overload
180181def use_async_effect (
181182 function : _AsyncEffectFunc ,
182183 dependencies : Sequence [Any ] | ellipsis | None = ...,
184+ shutdown_timeout : float = 0.1 ,
183185) -> None : ...
184186
185187
@@ -227,8 +229,8 @@ async def effect(stop: asyncio.Event) -> None:
227229 # Wait until we get the signal to stop this effect
228230 await stop .wait ()
229231
230- # If renders are queued back-to-back, then this effect function might have
231- # not completed. So, we give the task a small amount of time to finish.
232+ # If renders are queued back-to-back, the effect might not have
233+ # completed. So, we give the task a small amount of time to finish.
232234 # If it manages to finish, we can obtain a clean-up function.
233235 results , _ = await asyncio .wait ([task ], timeout = shutdown_timeout )
234236 if results :
You can’t perform that action at this time.
0 commit comments