source:
trip-planner-front/node_modules/fastq/example.mjs@
ceaed42
Last change on this file since ceaed42 was 6a3a178, checked in by , 3 years ago | |
---|---|
|
|
File size: 221 bytes |
Rev | Line | |
---|---|---|
[6a3a178] | 1 | import { promise as queueAsPromised } from './queue.js' |
2 | ||
3 | /* eslint-disable */ | |
4 | ||
5 | const queue = queueAsPromised(worker, 1) | |
6 | ||
7 | console.log('the result is', await queue.push(42)) | |
8 | ||
9 | async function worker (arg) { | |
10 | return 42 * 2 | |
11 | } |
Note:
See TracBrowser
for help on using the repository browser.