Skip to content

Commit

Permalink
Rename abort() to scheduleAbort() in example
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Aug 4, 2024
1 parent ce786fb commit 493b366
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/termination.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@ const getInactivityOptions = () => {
const cancelSignal = controller.signal;

// Delay and debounce `cancelSignal` each time `controller.abort()` is called
const abort = debounceFn(controller.abort.bind(controller), {wait});
const scheduleAbort = debounceFn(controller.abort.bind(controller), {wait});

const onOutput = {
* transform(data) {
// When anything is printed, debounce `controller.abort()`
abort();
scheduleAbort();

// Keep the output as is
yield data;
Expand All @@ -171,7 +171,7 @@ const getInactivityOptions = () => {
};

// Start debouncing
abort();
scheduleAbort();

return {
cancelSignal,
Expand Down

0 comments on commit 493b366

Please sign in to comment.