v0.1.0
A dispatch queue built in Typescript with the ability to configure multiple queue processors.
Repository
Current version released
2 years ago
Versions
DispatchQueue
A deno and npm dispatch queue with the ability to configure multiple queue processors.
Installation
Deno
import DispatchQueue from "https://deno.land/x/dispatch_queue/mod.ts";
Example Usage
const dispatcher = new DispatchQueue<string>({
processor: (stringValue, workerId) => {
conosle.log(`Worker, '${workerId}', is processing: '${stringValue}'`);
},
});
dispatcher.process("test1");
// OUTPUT: "Worker, 'worker-1', is processing: 'test1'"