Batch messages on the exthost to not freeze ads (#8949)

* batch messages on the exthost to not freeze ads

* clear out messages on query complete
This commit is contained in:
Anthony Dresser
2020-02-20 14:50:13 -08:00
committed by GitHub
parent 8fe0a13b61
commit 4c54b5dbac
11 changed files with 103 additions and 41 deletions

View File

@@ -340,10 +340,12 @@ class SqlKernel extends Disposable implements nb.IKernel {
this._errorMessageService.showDialog(Severity.Error, sqlKernelError, error);
});
}));
this._register(queryRunner.onMessage(message => {
this._register(queryRunner.onMessage(messages => {
// TODO handle showing a messages output (should be updated with all messages, only changing 1 output in total)
if (this._future && isUndefinedOrNull(message.selection)) {
this._future.handleMessage(message);
for (const message of messages) {
if (this._future && isUndefinedOrNull(message.selection)) {
this._future.handleMessage(message);
}
}
}));
this._register(queryRunner.onBatchEnd(batch => {