Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create new eventloop to run coroutines (#1055)
Summary: Prevent calling `asyncio.run` within `__iter__` function. New event loop would be created rather than reusing the global event loop. Using policy for the case of custom policy is used as suggested in https://docs.python.org/3.8/library/asyncio-eventloop.html#event-loop Address the [comment](https://docs.python.org/3/library/asyncio-runner.html#:~:text=It%20should%20be%20used%20as,ideally%20only%20be%20called%20once.&text=New%20in%20version%203.7.) Pull Request resolved: #1055 Reviewed By: wenleix, dracifer Differential Revision: D43630185 Pulled By: ejguan fbshipit-source-id: 2dbaffb379971433e29dfcbaa936064c4ce0a44b
- Loading branch information