lint SyncSender::send
#766
Labels
A-lint
Area: New lints
E-medium
Call for participation: Medium difficulty level problem and requires some initial experience.
L-correctness
Lint: Belongs in the correctness lint group
T-middle
Type: Probably requires verifiying types
I'm not sure many people are using the stdlib MPSC with
select!
destabilized, but I propose a lint that suggestsSyncSender::send
always be replaced withSyncSender::try_send
.The reason is that many users of
SyncSender
do not expect their senders to ever block, and are only usingSyncSender
to prevent bugs on the receiver end from translating into memory-DoS bugs. However, when usingsend
this means that such bugs can translate into DoS anyway by deadlocking.This should be allow by default.
The text was updated successfully, but these errors were encountered: