Ensure only one cell shows as running at a time (#4715)

This commit is contained in:
Chris LaFreniere
2019-03-27 19:04:07 -07:00
committed by GitHub
parent fc664a850d
commit ee413f3b24

View File

@@ -239,6 +239,7 @@ export class CellModel implements ICellModel {
this.sendNotification(notificationService, Severity.Error, message);
// TODO track error state for the cell
} finally {
this.disposeFuture();
this.fireExecutionStateChanged();
}
@@ -324,8 +325,7 @@ export class CellModel implements ICellModel {
let output: nb.ICellOutput = msg.content as nb.ICellOutput;
if (!this._future.inProgress) {
this._future.dispose();
this._future = undefined;
this.disposeFuture();
}
}
@@ -487,4 +487,10 @@ export class CellModel implements ICellModel {
}
return endpoint;
}
// Dispose and set current future to undefined
private disposeFuture() {
this._future.dispose();
this._future = undefined;
}
}