Skip to content

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

License

Notifications You must be signed in to change notification settings

jaeseokk/chunk-scheduler

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published