mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-14 21:06:28 +00:00
Update asyncio_blocking_operations for blocking ssl context (#2265)
This commit is contained in:
parent
8ea4549648
commit
7b4e29a990
@ -94,3 +94,17 @@ urllib does blocking I/O and should be run in the executor with the standard met
|
||||
#### stat
|
||||
|
||||
`os.stat` does blocking disk I/O and should be run in the executor with the standard methods above.
|
||||
|
||||
#### load_default_certs
|
||||
|
||||
`SSLContext.load_default_certs` does blocking disk I/O to load the certificates from disk.
|
||||
|
||||
The following helpers ensure that the blocking I/O will happen in the executor:
|
||||
|
||||
- `aiohttp`: `homeassistant.helpers.aiohttp_client.async_get_clientsession` to create the `aiohttp.ClientSession`.
|
||||
- `httpx`: `homeassistant.helpers.httpx_client.get_async_client` to create the `httpx.AsyncClient`.
|
||||
- Generic SSL: `homeassistant.util.ssl`
|
||||
|
||||
#### load_verify_locations
|
||||
|
||||
See [load_default_certs](#load_default_certs)
|
||||
|
Loading…
x
Reference in New Issue
Block a user