oly-queue
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

oly queue

import { task, WorkerProvider, Publisher } from "oly-queue";
 
class App {
  @task add({x, y}) {
    return x + y;
  }
}
 
const kernel = Kernel.create().with(App, WorkerProvider);
const publisher = kernel.get(Publisher);
 
await kernel.start();
const job = await publisher.push("App.add", {x: 1, y: 2});
const result = await publisher.wait(job);

Readme

Keywords

Package Sidebar

Install

npm i oly-queue

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

30.2 kB

Total Files

46

Last publish

Collaborators

  • nolyme