Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use asyncio lock #21985

Merged
merged 1 commit into from Mar 13, 2019

Conversation

Projects
None yet
2 participants
@amelchio
Copy link
Member

amelchio commented Mar 12, 2019

Description:

I am working on making the Sonos join/unjoin/snapshot/restore service calls blocking. That will make them easier to use in scripts but it means pausing for potentially several seconds while the speakers regroup.

This PR is preparing for that, moving the existing threading.Lock to asyncio.Lock and adding jumps to/from the event loop so I have somewhere to put that long pause. SoCo is not a great fit for this :-/

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox.
  • There is no commented out code in this PR.
@amelchio

This comment has been minimized.

Copy link
Member Author

amelchio commented Mar 13, 2019

Comments are still accepted but I will go ahead and merge this now since my following PRs depend on it and it is mostly a refactor anyway.

@amelchio amelchio merged commit c8692fe into home-assistant:dev Mar 13, 2019

4 checks passed

Hound No violations found. Woof!
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls First build on sonos-async-lock at 92.827%
Details

@wafflebot wafflebot bot removed the in progress label Mar 13, 2019

@amelchio amelchio referenced this pull request Mar 13, 2019

Merged

Avoid playing queue pollution with Sonos unjoin #22004

3 of 9 tasks complete

@balloob balloob referenced this pull request Mar 20, 2019

Merged

0.90.0 #22216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.