https://github.com/derhuerst/round-robin-scheduler
A round-robin scheduler, compatible with the abstract-scheduler interface.
https://github.com/derhuerst/round-robin-scheduler
abstract-scheduler round-robin scheduler scheduling
Last synced: 8 months ago
JSON representation
A round-robin scheduler, compatible with the abstract-scheduler interface.
- Host: GitHub
- URL: https://github.com/derhuerst/round-robin-scheduler
- Owner: derhuerst
- License: isc
- Created: 2018-07-23T12:11:06.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-01-06T16:45:39.000Z (almost 6 years ago)
- Last Synced: 2025-02-09T13:36:46.261Z (8 months ago)
- Topics: abstract-scheduler, round-robin, scheduler, scheduling
- Language: JavaScript
- Homepage: https://github.com/derhuerst/round-robin-scheduler#round-robin-scheduler
- Size: 8.79 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# round-robin-scheduler
**A [round-robin](https://en.wikipedia.org/wiki/Round-robin_scheduling) [scheduler](https://en.wikipedia.org/wiki/Scheduling_(computing)), compatible with the [`abstract-scheduler` interface](https://www.npmjs.com/package/abstract-scheduler).**
[](https://github.com/derhuerst/abstract-scheduler)
[](https://www.npmjs.com/package/@derhuerst/round-robin-scheduler)
[](https://travis-ci.org/derhuerst/round-robin-scheduler)

[](https://gitter.im/derhuerst)
[](https://patreon.com/derhuerst)## Installation
```shell
npm install @derhuerst/round-robin-scheduler
```## Usage
```js
const createRoundRobin = require('@derhuerst/round-robin-scheduler')const roundRobin = createRoundRobin(['foo', 'bar'])
roundRobin.get() // foo
roundRobin.get() // bar
roundRobin.add('baz') // 2
roundRobin.length // 3
roundRobin.get() // baz
roundRobin.remove(0) // remove first item
roundRobin.get() // bar
````roundRobin` is compatible with the [`abstract-scheduler` interface](https://www.npmjs.com/package/abstract-scheduler).
## Contributing
If you have a question or need support using `round-robin-scheduler`, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to [the issues page](https://github.com/derhuerst/round-robin-scheduler/issues).