mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: using write lock to fix acquire lock error (#5938)
This commit is contained in:
parent
7e53b34484
commit
1db8480b75
@ -373,7 +373,7 @@ impl FolderManager {
|
|||||||
F1: FnOnce() -> Output,
|
F1: FnOnce() -> Output,
|
||||||
F2: FnOnce(&Folder) -> Output,
|
F2: FnOnce(&Folder) -> Output,
|
||||||
{
|
{
|
||||||
let folder = self.mutex_folder.read();
|
let folder = self.mutex_folder.write();
|
||||||
match &*folder {
|
match &*folder {
|
||||||
None => none_callback(),
|
None => none_callback(),
|
||||||
Some(folder) => f2(folder),
|
Some(folder) => f2(folder),
|
||||||
|
Loading…
Reference in New Issue
Block a user