mirror of
https://github.com/lune-org/lune.git
synced 2025-04-20 03:43:49 +01:00
unlock mutex before using async
This commit is contained in:
parent
edb3041090
commit
9414a9fc29
1 changed files with 7 additions and 2 deletions
|
@ -102,8 +102,13 @@ impl RequireContext {
|
||||||
|
|
||||||
let pending = data_ref.pending.try_lock()?;
|
let pending = data_ref.pending.try_lock()?;
|
||||||
|
|
||||||
if let Some(a) = pending.get(&path_abs) {
|
if let Some(sender) = pending.get(&path_abs) {
|
||||||
a.subscribe().recv().await?;
|
let mut receiver = sender.subscribe();
|
||||||
|
|
||||||
|
// unlock mutex before using async
|
||||||
|
drop(pending);
|
||||||
|
|
||||||
|
receiver.recv().await?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue