提交 069ad194 编写于 作者: J Johannes Rieken

better mangement of LifecyclePhase.Eventually

上级 08226e24
...@@ -774,13 +774,13 @@ export class Workbench extends Disposable implements IPartService { ...@@ -774,13 +774,13 @@ export class Workbench extends Disposable implements IPartService {
// Set lifecycle phase to `Restored` // Set lifecycle phase to `Restored`
this.lifecycleService.phase = LifecyclePhase.Restored; this.lifecycleService.phase = LifecyclePhase.Restored;
// Set lifecycle phase to `Runnning For A Bit` after a short delay // Set lifecycle phase to `Eventually` after a short delay and when
let eventuallPhaseTimeoutHandle = runWhenIdle(() => { // idle (min 2.5sec, max 5sec)
eventuallPhaseTimeoutHandle = undefined; setTimeout(() => {
this.lifecycleService.phase = LifecyclePhase.Eventually; this._register(runWhenIdle(() => {
}, 5000); this.lifecycleService.phase = LifecyclePhase.Eventually;
}, 2500));
this._register(eventuallPhaseTimeoutHandle); }, 2500);
if (error) { if (error) {
errors.onUnexpectedError(error); errors.onUnexpectedError(error);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册