Skip to content

Commit 8e59441

Browse files
committed
Makes history public (readonly).
1 parent 1166a2e commit 8e59441

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/vs/editor/contrib/inlineCompletions/test/timeTravelScheduler.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ export class TimeTravelScheduler implements Scheduler {
144144

145145
export class AsyncSchedulerProcessor extends Disposable {
146146
private isProcessing = false;
147-
private readonly history = new Array<ScheduledTask>();
147+
private readonly _history = new Array<ScheduledTask>();
148+
public get history(): readonly ScheduledTask[] { return this._history; }
148149

149150
private readonly maxTaskCount: number;
150151

@@ -179,10 +180,10 @@ export class AsyncSchedulerProcessor extends Disposable {
179180
private process() {
180181
const executedTask = this.scheduler.runNext();
181182
if (executedTask) {
182-
this.history.push(executedTask);
183+
this._history.push(executedTask);
183184

184185
if (history.length >= this.maxTaskCount && this.scheduler.hasScheduledTasks) {
185-
const lastTasks = this.history.slice(Math.max(0, history.length - 10)).map(h => `${h.source.toString()}: ${h.source.stackTrace}`);
186+
const lastTasks = this._history.slice(Math.max(0, history.length - 10)).map(h => `${h.source.toString()}: ${h.source.stackTrace}`);
186187
let e = new Error(`Queue did not get empty after processing ${history.length} items. These are the last ${lastTasks.length} scheduled tasks:\n${lastTasks.join('\n\n\n')}`);
187188
this.lastError = e;
188189
throw e;

0 commit comments

Comments
 (0)