Spaces:
Sleeping
Sleeping
Download venv/lib/python3.12/asyncio/mixins.py from Pawan2605/DeepSearch_Agent: direct link, hf CLI and curl.
- Browser
- Download file 481 Bytes
-
https://huggingface.co/spaces/Pawan2605/DeepSearch_Agent/resolve/main/venv/lib/python3.12/asyncio/mixins.py
- Command line
-
hf download hf://spaces/Pawan2605/DeepSearch_Agent/venv/lib/python3.12/asyncio/mixins.py
-
curl -L -o mixins.py https://huggingface.co/spaces/Pawan2605/DeepSearch_Agent/resolve/main/venv/lib/python3.12/asyncio/mixins.py
481 Bytes
| """Event loop mixins.""" | |
| import threading | |
| from . import events | |
| _global_lock = threading.Lock() | |
| class _LoopBoundMixin: | |
| _loop = None | |
| def _get_loop(self): | |
| loop = events._get_running_loop() | |
| if self._loop is None: | |
| with _global_lock: | |
| if self._loop is None: | |
| self._loop = loop | |
| if loop is not self._loop: | |
| raise RuntimeError(f'{self!r} is bound to a different event loop') | |
| return loop | |