(self, amount: int)
| 35 | self.trailers = None |
| 36 | |
| 37 | async def wait_for(self, amount: int): |
| 38 | while True: |
| 39 | if self.buffer.have(amount): |
| 40 | return |
| 41 | self.expecting = amount |
| 42 | async with self.wake_up: |
| 43 | await self.wake_up.wait() |
| 44 | self.expecting = 0 |
| 45 | |
| 46 | async def receive(self, timeout: Optional[float] = None): |
| 47 | context: Union[trio.CancelScope, NullContext] |