home-assistant-core/homeassistant
J. Nick Koston 164403de20
Add thread safety checks to async_create_task (#116339)
* Add thread safety checks to async_create_task

Calling async_create_task from a thread almost always results in an
fast crash. Since most internals are using async_create_background_task
or other task APIs, and this is the one integrations seem to get wrong
the most, add a thread safety check here

* Add thread safety checks to async_create_task

Calling async_create_task from a thread almost always results in an
fast crash. Since most internals are using async_create_background_task
or other task APIs, and this is the one integrations seem to get wrong
the most, add a thread safety check here

* missed one

* Update homeassistant/core.py

* fix mocks

* one more internal

* more places where internal can be used

* more places where internal can be used

* more places where internal can be used

* internal one more place since this is high volume and was already eager_start
2024-04-28 18:29:00 -04:00
..
auth Add strict connection (#112387) 2024-04-12 14:47:46 +02:00
backports
brands
components Avoid creating tasks to update universal media player (#116350) 2024-04-28 18:17:26 -04:00
generated Expose the SkyConnect integration with a firmware config/options flow (#115363) 2024-04-24 17:06:24 +02:00
helpers Add thread safety checks to async_create_task (#116339) 2024-04-28 18:29:00 -04:00
scripts
util Bump ruff to 0.4.2 (#116201) 2024-04-26 08:48:32 +02:00
__init__.py
__main__.py
block_async_io.py
bootstrap.py Add thread safety checks to async_create_task (#116339) 2024-04-28 18:29:00 -04:00
config.py Add debug mode to catch unsafe thread operations using core helpers (#115390) 2024-04-24 03:36:05 +02:00
config_entries.py Add thread safety checks to async_create_task (#116339) 2024-04-28 18:29:00 -04:00
const.py Bump version to 2024.6.0dev0 (#116120) 2024-04-24 23:16:48 +02:00
core.py Add thread safety checks to async_create_task (#116339) 2024-04-28 18:29:00 -04:00
data_entry_flow.py Rename bus._async_fire to bus.async_fire_internal (#116027) 2024-04-23 22:28:31 +02:00
exceptions.py Translate service validation errors (#115024) 2024-04-18 14:36:03 +02:00
loader.py Avoid falling back to event loop import on ModuleNotFound (#115404) 2024-04-11 16:32:47 -10:00
package_constraints.txt Update frontend to 20240426.0 (#116230) 2024-04-26 15:40:32 +02:00
py.typed Add py.typed file (#115446) 2024-04-11 22:14:10 -04:00
requirements.py Speed up singleton decorator so it can be used more places (#116292) 2024-04-28 12:11:08 -05:00
runner.py Add debug mode to catch unsafe thread operations using core helpers (#115390) 2024-04-24 03:36:05 +02:00
setup.py Add thread safety checks to async_create_task (#116339) 2024-04-28 18:29:00 -04:00
strings.json