mirror of
https://github.com/hexedtech/codemp-vscode.git
synced 2024-11-21 23:14:49 +01:00
fix: only ever spawn one changes consumer
This commit is contained in:
parent
73b3c31ac1
commit
4bc05b1766
1 changed files with 4 additions and 0 deletions
|
@ -239,7 +239,10 @@ export async function attach(selected: vscode.TreeItem | undefined) {
|
|||
});
|
||||
}
|
||||
});
|
||||
let consuming = false;
|
||||
buffer.callback(async (controller: codemp.BufferController) => {
|
||||
if (consuming) return;
|
||||
consuming = true;
|
||||
while (true) {
|
||||
let event = await controller.try_recv();
|
||||
if (event === null) break;
|
||||
|
@ -258,6 +261,7 @@ export async function attach(selected: vscode.TreeItem | undefined) {
|
|||
locks.set(buffer_name, false);
|
||||
|
||||
}
|
||||
consuming = false;
|
||||
});
|
||||
provider.refresh();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue