Skip to content

Commit

Permalink
doc: change comment on abort listener example in README
Browse files Browse the repository at this point in the history
  • Loading branch information
joshLong145 committed Oct 14, 2024
1 parent 5860b99 commit b802311
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,11 +458,9 @@ function asyncTimeout() {
let timeout = setTimeout(() => {
resolve();
}, 5000);

// An abort listener allows for cleanup for a given worker
// such that it may be resused for future tasks
// if an execption is thrown within scope of the handler
// the worker instance will be destroyed.

// Register a listener which will resolve before the time out
// above triggers.
me.worker.addAbortListener(async function () {
clearTimeout(timeout);
resolve();
Expand Down

0 comments on commit b802311

Please sign in to comment.