justheuristic 3 anos atrás
pai
commit
36928a534c
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      hivemind/utils/asyncio.py

+ 2 - 2
hivemind/utils/asyncio.py

@@ -4,7 +4,7 @@ from concurrent.futures import ThreadPoolExecutor
 from contextlib import AbstractAsyncContextManager, AbstractContextManager, asynccontextmanager
 from contextlib import AbstractAsyncContextManager, AbstractContextManager, asynccontextmanager
 from typing import AsyncIterable, AsyncIterator, Awaitable, Callable, Iterable, Optional, Tuple, TypeVar, Union
 from typing import AsyncIterable, AsyncIterator, Awaitable, Callable, Iterable, Optional, Tuple, TypeVar, Union
 
 
-import uvloop
+#import uvloop
 
 
 from hivemind.utils.logging import get_logger
 from hivemind.utils.logging import get_logger
 
 
@@ -18,7 +18,7 @@ def switch_to_uvloop() -> asyncio.AbstractEventLoop:
         asyncio.get_event_loop().stop()  # if we're in jupyter, get rid of its built-in event loop
         asyncio.get_event_loop().stop()  # if we're in jupyter, get rid of its built-in event loop
     except RuntimeError as error_no_event_loop:
     except RuntimeError as error_no_event_loop:
         pass  # this allows running DHT from background threads with no event loop
         pass  # this allows running DHT from background threads with no event loop
-    uvloop.install()
+    #uvloop.install()
     loop = asyncio.new_event_loop()
     loop = asyncio.new_event_loop()
     asyncio.set_event_loop(loop)
     asyncio.set_event_loop(loop)
     return loop
     return loop