Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revisit selector loop policy on windows #29

Open
efiop opened this issue Jan 25, 2023 · 2 comments
Open

revisit selector loop policy on windows #29

efiop opened this issue Jan 25, 2023 · 2 comments

Comments

@efiop
Copy link
Member

efiop commented Jan 25, 2023

ronf/asyncssh#537 (comment)

@SlavaDm
Copy link

SlavaDm commented Jan 26, 2023

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)
        

@efiop
Copy link
Member Author

efiop commented Jan 26, 2023

@SlavaDm Thanks for trying it out!

Ok, looks like we need to reconsider fsspec/filesystem_spec#656

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants