Limit concurrency of async_get_integration to avoid creating extra threads (#43085)

* Limit concurrency of async_get_integration to avoid creating extra threads

Since async_get_integration is waiting on the disk most of the time
it would end up creating many new threads because the disk could
not deliver the data in time.

* pylint
This commit is contained in:
J. Nick Koston
2020-11-10 21:34:54 -10:00
committed by GitHub
parent 518e462e9a
commit 94bf55e29b
6 changed files with 68 additions and 9 deletions

View File

@@ -50,6 +50,8 @@ CUSTOM_WARNING = (
)
_UNDEF = object()
MAX_LOAD_CONCURRENTLY = 4
def manifest_from_legacy_module(domain: str, module: ModuleType) -> Dict:
"""Generate a manifest from a legacy module."""