docs: stream operator throttle typo (#1348)

* docs: stream operator throttle typo

* more clarify

* Update docs/src/main/paradox/stream/operators/Source-or-Flow/throttle.md

* Update docs/src/main/paradox/stream/operators/Source-or-Flow/throttle.md

Co-authored-by: Arnout Engelen <arnout@engelen.eu>

---------

Co-authored-by: Arnout Engelen <arnout@engelen.eu>
This commit is contained in:
AndyChen(Jingzhang) 2024-05-29 01:49:59 +08:00 committed by GitHub
parent 49210976aa
commit f7eddaa1aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,7 +21,7 @@ See also @ref:[Buffers and working with rate](../../stream-rate.md) for related
## Example
Imagine the server end of a streaming platform. When a client connects and request a video content, the server
should return the content. Instead of serving a complete video as fast as bandwith allows, `throttle` can be used
should return the content. Instead of serving a complete video as fast as bandwidth allows, `throttle` can be used
to limit the network usage to 24 frames per second (let's imagine this streaming platform stores frames, not bytes).
Scala
@ -41,8 +41,8 @@ Scala
Java
: @@snip [Throttle.java](/docs/src/test/java/jdocs/stream/operators/sourceorflow/Throttle.java) { #throttle-with-burst }
The extra argument to set the `ThrottleMode` to `shaping` tells `throttle` to make pauses to avoid exceeding
the maximum rate. Alternatively we could set the throttling mode to cause a stream failure when upstream is faster
The extra argument to set the `ThrottleMode` to `shaping` tells throttle to make pauses to avoid exceeding
the maximum rate. Alternatively we could set the `ThrottleMode` to `enforcing` to cause a stream failure when upstream is faster
than the throttle rate.
The examples above don't cover all the parameters supported by `throttle` (e.g. `cost`-based throttling). See the