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

better mangement of LifecyclePhase.Eventually

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