Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Implement the streaming flow control. These diffs are equivalent to `ServerGeneratorStream::fromAsyncGeneratorImpl` https://www.internalfb.com/code/fbsource/fbcode/thrift/lib/cpp2/async/ServerGeneratorStream-inl.h?lines=22-100 Add a method to send Payload 1. Payload is only sent if previous call to `genIsStreamReady` or `genSendPayload` returns true. 2. `genSendPaylaod` published the payload and then checks if server still has credits and stream is not paused. i) If there are no credits and stream is not paused, then wait for more credits before returning. ii) Process client messages and return `?bool` as per the state of the stream 3. send stream complete if no more payloads left. ------------------------------ Flow diagram {F1698728124} Reviewed By: AkramaMirza Differential Revision: D55172705 fbshipit-source-id: 1ad157cdba45c11d1ba291b94e220d283852c506
- Loading branch information