MCPcopy Index your code
hub / github.com/couchbase/couchbase-python-client / get_event_loop

Function get_event_loop

acouchbase/__init__.py:87–100  ·  view source on GitHub ↗

Get an event loop compatible with acouchbase. Some Event loops, such as ProactorEventLoop (the default asyncio event loop for Python 3.8 on Windows) are not compatible with acouchbase as they don't implement all members in the abstract base class. Args: evloop (asyncio.Abs

(evloop: Optional[asyncio.AbstractEventLoop] = None)

Source from the content-addressed store, hash-verified

85
86
87def get_event_loop(evloop: Optional[asyncio.AbstractEventLoop] = None) -> asyncio.AbstractEventLoop:
88 """
89 Get an event loop compatible with acouchbase.
90
91 Some Event loops, such as ProactorEventLoop (the default asyncio event loop for Python 3.8 on Windows)
92 are not compatible with acouchbase as they don't implement all members in the abstract base class.
93
94 Args:
95 evloop (asyncio.AbstractEventLoop, optional): An optional event loop to validate. If not provided, the default event loop will be used.
96
97 Returns:
98 The preferred event loop, if compatible, otherwise, a compatible alternative event loop.
99 """ # noqa: E501
100 return LoopValidator.get_event_loop(evloop)

Callers 15

_get_loopMethod · 0.90
__init__.pyFile · 0.90
_validate_loopMethod · 0.90
init_reactorFunction · 0.90
event_loopMethod · 0.85
event_loopMethod · 0.85
event_loopMethod · 0.85
event_loopMethod · 0.85
event_loopMethod · 0.85
event_loopMethod · 0.85
event_loopMethod · 0.85

Calls 1

get_event_loopMethod · 0.80

Tested by 2

init_reactorFunction · 0.72
event_loopFunction · 0.68