MCPcopy Index your code
hub / github.com/python/cpython / _set_event_loop_policy

Function _set_event_loop_policy

Lib/asyncio/events.py:808–815  ·  view source on GitHub ↗

Set the current event loop policy. If policy is None, the default policy is restored.

(policy)

Source from the content-addressed store, hash-verified

806 return _get_event_loop_policy()
807
808def _set_event_loop_policy(policy):
809 """Set the current event loop policy.
810
811 If policy is None, the default policy is restored."""
812 global _event_loop_policy
813 if policy is not None and not isinstance(policy, _AbstractEventLoopPolicy):
814 raise TypeError(f"policy must be an instance of AbstractEventLoopPolicy or None, not '{type(policy).__name__}'")
815 _event_loop_policy = policy
816
817def set_event_loop_policy(policy):
818 warnings._deprecated('asyncio.set_event_loop_policy', remove=(3,16))

Callers 2

tearDownFunction · 0.90
set_event_loop_policyFunction · 0.85

Calls

no outgoing calls

Tested by 1

tearDownFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…