@jaeseokk/chunk-scheduler

0.0.1 • Public • Published

chunk-scheduler

Slice your heavy task in light chunk and run them asynchronously.


Installation

yarn add @jaeseokk/chunk-scheduler

Getting started

import chunkScheduler from '@jaeseokk/chunk-scheduler'

const scheduler = createScheduler()

function* chunkGenerator() {
  let result = 0

  for (let i = 0; i < 10; i++) {
    result += i
    yield
  }

  return result
}

scheduler.runChunks(chunkGenerator())

License

MIT as always

Package Sidebar

Install

npm i @jaeseokk/chunk-scheduler

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

152 kB

Total Files

9

Last publish

Collaborators

  • jaeseokk