()
| 17 | |
| 18 | async def _concurrent(*args): |
| 19 | def run(): |
| 20 | if inspect.iscoroutinefunction(fn): |
| 21 | # Run the async function in a new event loop |
| 22 | loop = asyncio.new_event_loop() |
| 23 | try: |
| 24 | loop.run_until_complete(fn(*args)) |
| 25 | finally: |
| 26 | loop.close() |
| 27 | else: |
| 28 | fn(*args) |
| 29 | |
| 30 | await asyncio.get_running_loop().run_in_executor(None, run) |
| 31 |
nothing calls this directly
no test coverage detected