Bug Fix
Prevent concurrent access to the underlying connection when a request is in progress.
Example:
python
connection = await pywreck.Connection.create("www.example.com")
coros = (connection.request("GET", "/foo"), connection.request("GET", "/bar"))
await asyncio.gather(*coros)
Note: this request cannot execute concurrently since the underlying connection can only be used for one HTTP/1 request at a time. The exclusive access to the underlying connection is now enforced.
To execute this request concurrently, 2 separate connections must be opened:
python
coros = (pywreck.request("GET", "www.example.com", "/foo"), pywreck.request("GET", "www.example.com", "/bar"))
await asyncio.gather(*coros)
**Full Changelog**: https://github.com/a-feld/pywreck/compare/v0.3.0...v0.4.0