feat: spiders use uvloop/winloop when available

This commit is contained in:
Karim shoair
2026-01-11 18:39:42 +02:00
parent d5b9ed11b2
commit 0bfdab7158
+3
View File
@@ -203,4 +203,7 @@ class Spider(ABC):
:param backend_options: Asyncio backend options to be used with `anyio.run`
"""
backend_options = backend_options or {}
# By default use the faster uvloop/winloop event loop implementation, if available
backend_options.update({"use_uvloop": True})
return anyio.run(self.__run, backend="asyncio", backend_options=backend_options)