core: judge: add concurrency control to task consumer (#719)

Co-authored-by: undefined <i@undefined.moe>
This commit is contained in:
Yang Gaoandundefined authored and GitHub committed 2024-01-28 01:23:05 +08:00
1 parent 8b10f51430
commit 6b759cbe63
9 files changed
+130 -83

No files matched your search

@@ -256,7 +256,7 @@ export default class Editor extends DOMAttachedObject {
if (hasFocus) this.focus();
}
destory() {
destroy() {
this.detach();
if (this.vditor?.destroy) this.vditor.destroy();
else if (this.editor?.dispose) this.editor.dispose();
@@ -34,7 +34,7 @@ async function startEdit(filename, value, fileCategory = 'file') {
});
const action = await promise;
value = (editor.value() as string).replace(/\r\n/g, '\n');
editor.destory();
editor.destroy();
if (action !== 'ok') return null;
return value;
}
@@ -143,7 +143,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(class MonacoEditor e
}
componentWillUnmount() {
if (this.vjEditor) this.vjEditor.destory();
if (this.vjEditor) this.vjEditor.destroy();
if (this.model) this.model.dispose();
if (this.editor) this.editor.dispose();
this.disposable.map((i) => i.dispose());