As I stated in #52 fixing the cancellation issue without removing reader is too hard.
I've gone through the code base. The Reader is responsible for synchronous consumption of frames, but there is No need for that if we just maintain the code correctly:
Synchroniser.await should be called right after sender.send_* method. At least it should not contain yield from calls in between.
In asyncio we already have the loop, which has a great scheduling machinery, that will guaranty sequential call order.
Coverage increased (+0.2%) to 96.009% when pulling bc4265f69f936ff8767fcc7079150bce1a2d122f on TarasLevelUp:cancel_methods into 8f55f2f03cba8aea7c8f1532fa283df3bc50b02e on benjamin-hodgson:master.
As I stated in #52 fixing the cancellation issue without removing
reader
is too hard. I've gone through the code base. TheReader
is responsible for synchronous consumption of frames, but there is No need for that if we just maintain the code correctly:Synchroniser.await
should be called right aftersender.send_*
method. At least it should not containyield from
calls in between.In
asyncio
we already have the loop, which has a great scheduling machinery, that will guaranty sequential call order.