Skip to content
This repository has been archived by the owner on May 29, 2023. It is now read-only.

Commit

Permalink
chore: rename terminate -> terminateWorker
Browse files Browse the repository at this point in the history
  • Loading branch information
IKatsuba committed Nov 26, 2020
1 parent 49dcbd3 commit ac1a2d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions projects/workers/src/worker/pipes/worker.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class WorkerPipe implements PipeTransform, OnDestroy {

transform<T, R>(value: T, fn: WorkerFunction<T, R>): Observable<R> {
if (this.fn !== fn) {
this.terminate();
this.terminateWorker();
this.initNewWorker(fn);
}

Expand All @@ -24,10 +24,10 @@ export class WorkerPipe implements PipeTransform, OnDestroy {
}

ngOnDestroy(): void {
this.terminate();
this.terminateWorker();
}

private terminate() {
private terminateWorker() {
if (this.worker) {
this.worker.terminate();
}
Expand Down

0 comments on commit ac1a2d2

Please sign in to comment.