Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TOC for README.md #41

Merged
merged 1 commit into from
Feb 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 33 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Qyu

`qyu` is a general-purpose asynchronous job queue for the browser and Node.js. It is flexible and easy to use, always accepting jobs and running them as fast as the concurrency settings dictate.

Qyu was meant for:
Expand Down Expand Up @@ -46,19 +47,38 @@ await q.whenEmpty(); // When all tasks finished and queue is empty...

# Features

- Always on and ready to receive additional tasks
- Configurable concurrency limit
- Configurable queue capacity limit
- Configurable priority per individual tasks
- Configurable queue timeout duration per individual tasks
- Pause/resume queue execution
- Compatible for browsers as well as Node.js environments
- Written in TypeScript, full type definitions built-in
- Provides both CJS and ESM builds
- ✔️ Always on and ready to receive additional tasks
- ✔️ Configurable concurrency limit
- ✔️ Configurable queue capacity limit
- ✔️ Configurable priority per individual tasks
- ✔️ Configurable queue timeout duration per individual tasks
- ✔️ Pause/resume queue execution
- ✔️ Compatible for browsers as well as Node.js environments
- ✔️ Written in TypeScript, full type definitions built-in
- ✔️ Provides both CJS and ESM builds



# Table of Contents

- [Instance Config](#instance-config)
- [`concurrency`](#concurrency)
- [`capacity`](#capacity)
- [`rampUpTime`](#rampuptime)
- [Queuing options](#queuing-option)
- [`priority`](#priority)
- [`timeout`](#timeout)
- [API](#api)
- [instance(`jobs`)](#instancejobs)
- [instance#whenEmpty()](#instancewhenempty)
- [instance#whenFree()](#instancewhenfree)
- [instance#pause()](#instancepause)
- [instance#resume()](#instanceresume)
- [instance#empty()](#instanceempty)
- [instance#set(`config`)](#instancesetconfig)
- [Examples](#examples)


<!--
TODO: Add "Table of Contents" here like in `iterified`!
-->

# Instance Config

Expand Down Expand Up @@ -99,7 +119,7 @@ for (let i = 0; i < 6; i++) {
}
```

#### rampUpTime:
#### `rampUpTime`:

If specified a non-zero number, will delay the concurrency-ramping-up time of additional job executions, one by one, as the instance attempts to reach maximum configured concurrency.
Represents number of milliseconds.
Expand Down