sshfs icon indicating copy to clipboard operation
sshfs copied to clipboard

revisit selector loop policy on windows

Open efiop opened this issue 2 years ago • 2 comments

https://github.com/ronf/asyncssh/issues/537#issue-1556251100

efiop avatar Jan 25 '23 17:01 efiop

To fix that problem, I commented a part of the code in file fsspec/asyn.py.

@contextmanager
def _selector_policy():
    original_policy = asyncio.get_event_loop_policy()
    try:
        # if (
        #     sys.version_info >= (3, 8)
        #     and os.name == "nt"
        #     and hasattr(asyncio, "WindowsSelectorEventLoopPolicy")
        # ):
        # asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
        yield
    finally:
        asyncio.set_event_loop_policy(original_policy)
        

SlavaDm avatar Jan 26 '23 13:01 SlavaDm

@SlavaDm Thanks for trying it out!

Ok, looks like we need to reconsider https://github.com/fsspec/filesystem_spec/issues/656

efiop avatar Jan 26 '23 16:01 efiop