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

What is the purpose of binding each file to a particular loop? #153

Closed
rhelmot opened this issue Dec 7, 2022 · 1 comment · Fixed by #154
Closed

What is the purpose of binding each file to a particular loop? #153

rhelmot opened this issue Dec 7, 2022 · 1 comment · Fixed by #154

Comments

@rhelmot
Copy link
Contributor

rhelmot commented Dec 7, 2022

It's somewhat inconvenient that AsyncBase._loop exists - it makes it hard to implement a global stdout object via a module-level stdout = aiofiles.threadpool.wrap(sys.stdout). What is the purpose of this attribute? If it is purely for performance reasons, would you accept a PR that changed all references to self._loop to self._loop or asyncio.get_running_loop()?

@Tinche
Copy link
Owner

Tinche commented Dec 8, 2022

I don't remember, it's been a long time.

I wouldn't mind merging a thought-out PR if it solves your problem.

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

Successfully merging a pull request may close this issue.

2 participants