Logo
Explore Help
Sign In
fluencelabs/rust-libp2p
1
0
Fork 0
You've already forked rust-libp2p
mirror of https://github.com/fluencelabs/rust-libp2p synced 2025-05-13 03:17:14 +00:00
Code Issues Projects Releases Wiki Activity
rust-libp2p/clippy.toml

4 lines
117 B
TOML
Raw Normal View History

clippy.toml: Create config and disallow unbounded channels (#2823) When using channels (e.g. `futures::channel::mpsc` or `std::sync::mpsc`) always use the bounded variant, never use the unbounded variant. When using a bounded channel, a slow consumer eventually slows down a fast producer once the channel bound is reached, ideally granting the slow consumer more system resources e.g. CPU time, keeping queues small and thus latencies low. When using an unbounded channel a fast producer continues being a fast producer, growing the channel buffer indefinitely, increasing latency until the illusion of unboundedness breaks and the system runs out of memory. One may use an unbounded channel if one enforces backpressure through an out-of-band mechanism, e.g. the consumer granting the producer send-tokens through a side-channel.
2022-08-20 07:31:45 +02:00
disallowed-methods = [
{ path = "futures::channel::mpsc::unbounded", reason = "does not enforce backpressure" },
]
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 64ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API