Skip to content

Use IntoFuture for Mutex.lock #5047

Answered by Darksonn
LasseRosenow asked this question in Ideas
Discussion options

You must be logged in to vote

Ignoring the fact that this is incompatible with our minimum-supported-rust-version, that doesn't seem like a good idea. It seems less confusing to have an explicit lock method.

Also, I believe the .await of IntoFuture consumes the argument, which is not appropriate for locking a mutex.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hawkw
Comment options

Answer selected by LasseRosenow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants