fix bug in blocking thread
This commit is contained in:
parent
4922cd228f
commit
bbce4547cf
@ -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