Skip to content

Commit

Permalink
doc: update README.md (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
batosai authored Oct 6, 2024
1 parent 7764b28 commit 91163b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,15 @@ refreshCache()
// HOW DO WE KNOW IF THE CACHE WAS REFRESHED??
```

You can linearly `await` the completion of a task using the `queue.createMonitor` method. The `createMonitor` method returns a promise that will be resolved after completing the task.
You can linearly `await` the completion of a task using the `queue.createNotifier` method. The `createNotifier` method returns a promise that will be resolved after completing the task.

```ts
import { queue, refreshCache } from './some-file.js'

const monitor = queue.createMonitor()
const notifier = queue.createNotifier()
refreshCache()

await monitor
await notifier
/**
* Task has been processed. You can now check if the
* cache has been refreshed
Expand Down

0 comments on commit 91163b0

Please sign in to comment.