mirror of https://github.com/microsoft/vscode.git
removing cancelable async iterable object
This commit is contained in:
parent
4fce043554
commit
f3c91c1229
|
@ -2168,18 +2168,6 @@ export class AsyncIterableObject<T> implements AsyncIterable<T> {
|
|||
}
|
||||
}
|
||||
|
||||
export class CancelableAsyncIterableObject<T> extends AsyncIterableObject<T> {
|
||||
constructor(
|
||||
private readonly _source: CancellationTokenSource,
|
||||
executor: AsyncIterableExecutor<T>
|
||||
) {
|
||||
super(executor);
|
||||
}
|
||||
|
||||
cancel(): void {
|
||||
this._source.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
export function createCancelableAsyncIterableProducer<T>(callback: (token: CancellationToken) => AsyncIterable<T>): CancelableAsyncIterableProducer<T> {
|
||||
const source = new CancellationTokenSource();
|
||||
|
|
Loading…
Reference in New Issue