Skip to content

Properties that do I/O don't do well with asyncio #3

Description

@balloob

This lib does I/O when a property is set.

# This makes network calls
device.operationMode = "heat"

This makes it difficult to use in asyncio, because now all code will need to be wrapped in synchronous functions. It also makes it risky that if a developer does not pay attention, they end up doing I/O inside the event loop.

Using functions is preferred

device.set_operation_mode("heat")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions