fix bug in blocking thread
This commit is contained in:
parent
9644182c4e
commit
a2a79d8459
@ -118,8 +118,10 @@ async fn watchfiles(ctx: &Arc<Mutex<Context>>) -> Receiver<FileEvent> {
|
||||
loop {
|
||||
let events: Vec<InotifyEvent>;
|
||||
{
|
||||
let ctx = ctx.lock().await;
|
||||
events = ctx.instance.read_events().unwrap();
|
||||
let c = ctx.lock().await;
|
||||
let instance = c.instance.clone();
|
||||
drop(c);
|
||||
events = instance.read_events().unwrap();
|
||||
}
|
||||
|
||||
for inevent in events {
|
||||
|
Loading…
Reference in New Issue
Block a user