Commit a3a9ffc
docs: Correct the manual flow control README regarding onNext blocking (#12700)
### Description
This PR updates the "Outgoing Flow Control" section in the Manual Flow
Control example's README.
The previous documentation incorrectly implied that calling `onNext()`
on a stream would block if the underlying Netty buffer was full, thereby
limiting the send rate. This PR clarifies that `onNext()` does *not*
block, but rather queues the messages in memory, which can ultimately
lead to an `OutOfMemoryError` if messages are sent too quickly.
The updated text correctly advises developers to use
`CallStreamObserver.isReady()` to prevent this memory exhaustion, rather
than to avoid blocking.
Fixes #12657
---------
Co-authored-by: Kannan J <kannanjgithub@google.com>1 parent 91e9491 commit a3a9ffc
File tree
1 file changed
+5
-11
lines changed- examples/src/main/java/io/grpc/examples/manualflowcontrol
1 file changed
+5
-11
lines changedLines changed: 5 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 28 | + | |
36 | 29 | | |
37 | 30 | | |
38 | 31 | | |
| |||
71 | 64 | | |
72 | 65 | | |
73 | 66 | | |
| 67 | + | |
74 | 68 | | |
75 | 69 | | |
76 | | - | |
| 70 | + | |
0 commit comments