mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Ensure only one cell shows as running at a time (#4715)
This commit is contained in:
@@ -239,6 +239,7 @@ export class CellModel implements ICellModel {
|
|||||||
this.sendNotification(notificationService, Severity.Error, message);
|
this.sendNotification(notificationService, Severity.Error, message);
|
||||||
// TODO track error state for the cell
|
// TODO track error state for the cell
|
||||||
} finally {
|
} finally {
|
||||||
|
this.disposeFuture();
|
||||||
this.fireExecutionStateChanged();
|
this.fireExecutionStateChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -324,8 +325,7 @@ export class CellModel implements ICellModel {
|
|||||||
let output: nb.ICellOutput = msg.content as nb.ICellOutput;
|
let output: nb.ICellOutput = msg.content as nb.ICellOutput;
|
||||||
|
|
||||||
if (!this._future.inProgress) {
|
if (!this._future.inProgress) {
|
||||||
this._future.dispose();
|
this.disposeFuture();
|
||||||
this._future = undefined;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -487,4 +487,10 @@ export class CellModel implements ICellModel {
|
|||||||
}
|
}
|
||||||
return endpoint;
|
return endpoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Dispose and set current future to undefined
|
||||||
|
private disposeFuture() {
|
||||||
|
this._future.dispose();
|
||||||
|
this._future = undefined;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user