Source code for azure.eventhub.aio.eventprocessor.utils

# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------------------------------------

import asyncio


[docs]def get_running_loop(): try: return asyncio.get_running_loop() except AttributeError: # 3.5 / 3.6 loop = asyncio._get_running_loop() # pylint: disable=protected-access, no-member if loop is None: raise RuntimeError('No running event loop') return loop