Home Assistant Unofficial Reference 2024.12.1
homeassistant.util.loop Namespace Reference

Functions

str _dev_help_message (str what)
 
str _get_line_from_cache (str filename, int lineno)
 
Callable[_P, _R] _R (Callable[_P, _R] func, int loop_thread_id, bool strict=True, bool strict_core=True, Callable[[dict[str, Any]], bool]|None check_allowed=None)
 
None raise_for_blocking_call (Callable[..., Any] func, Callable[[dict[str, Any]], bool]|None check_allowed=None, bool strict=True, bool strict_core=True, **Any mapped_args)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 

Detailed Description

asyncio loop utilities.

Function Documentation

◆ _dev_help_message()

str homeassistant.util.loop._dev_help_message ( str  what)
private
Generate help message to guide developers.

Definition at line 171 of file loop.py.

◆ _get_line_from_cache()

str homeassistant.util.loop._get_line_from_cache ( str  filename,
int  lineno 
)
private
Get line from cache or read from file.

Definition at line 25 of file loop.py.

◆ _R()

Callable[_P, _R] homeassistant.util.loop._R ( Callable[_P, _R]  func,
int  loop_thread_id,
bool   strict = True,
bool   strict_core = True,
Callable[[dict[str, Any]], bool] | None   check_allowed = None 
)
private
Protect function from running in event loop.

Definition at line 180 of file loop.py.

◆ raise_for_blocking_call()

None homeassistant.util.loop.raise_for_blocking_call ( Callable[..., Any]  func,
Callable[[dict[str, Any]], bool] | None   check_allowed = None,
bool   strict = True,
bool   strict_core = True,
**Any  mapped_args 
)
Warn if called inside the event loop. Raise if `strict` is True.

Definition at line 35 of file loop.py.

Variable Documentation

◆ _LOGGER

homeassistant.util.loop._LOGGER = logging.getLogger(__name__)
private

Definition at line 22 of file loop.py.