Lock is not immediately released after acquiring value in function argument #5056
Labels
A-tokio
Area: The main tokio crate
C-question
User questions that are neither feature requests nor bug reports
M-sync
Module: tokio/sync
Version
v1.21.1
Platform
Linux 5.18.19 #1 SMP
aarch64 GNU/Linux
Description
Link to reproduce
There is a deadlock in the above example that only happens if we acquire a lock as part of a function call/arguments.
The body of the function will in turn acquire a lock again and deadlocks in the above example.
As a user I expect that the lock will be released after the value was loaded, like in local
let
bindings. But this is not the case here.The text was updated successfully, but these errors were encountered: