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

Add ConcurrencyBackend interface #60

Merged
merged 2 commits into from
May 14, 2019
Merged

Conversation

tomchristie
Copy link
Member

The low-level "make an outbound connection, and return a pair of streams" is now wrapped up in a ConcurrencyBackend interface. I think this should allow us to add trio support fairly easily if we want it.

Also it'll make it much easier for us to fully test out the HTTP handling without neccessarily needing to spin up a server to test against, since we can inject a backend that presents the stream interfaces without actually connecting to the network.

@tomchristie
Copy link
Member Author

If we go for trio support based on this, then I think that conncurrency.py should instead become:

  • concurrency/asyncio_backend.py
  • concurrency/trio_backend.py

Tho it's not obvs. to me if we should support this in the lib itself.

@tomchristie tomchristie merged commit 3d997af into master May 14, 2019
@tomchristie tomchristie deleted the concurrency-backend-class branch May 14, 2019 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant