mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-11-15 22:10:14 +00:00
Add integration quality scale docs (#2457)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com> Co-authored-by: Franck Nijhof <frenck@frenck.nl> Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a1f286224a
commit
cf52c30bc0
@@ -0,0 +1,25 @@
|
||||
---
|
||||
title: "Dependency is async"
|
||||
related_rules:
|
||||
- inject-websession
|
||||
---
|
||||
import RelatedRules from './_includes/related_rules.jsx'
|
||||
|
||||
## Reasoning
|
||||
|
||||
Home Assistant works with asyncio to be efficient when handling tasks.
|
||||
To avoid switching context between the asyncio event loop and other threads, which is costly performance wise, ideally, your library should also use asyncio.
|
||||
|
||||
This results not only in a more efficient system but the code is also more neat.
|
||||
|
||||
## Additional resources
|
||||
|
||||
More information on how to create a library can be found in the [documentation](../../../api_lib_index).
|
||||
|
||||
## Exceptions
|
||||
|
||||
There are no exceptions to this rule.
|
||||
|
||||
## Related rules
|
||||
|
||||
<RelatedRules relatedRules={frontMatter.related_rules}></RelatedRules>
|
||||
Reference in New Issue
Block a user