Skip to content

Commit 4ec1b47

Browse files
committed
Improve README
1 parent 393294a commit 4ec1b47

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![npm version](https://img.shields.io/npm/v/d4c-queue.svg)](https://www.npmjs.com/package/d4c-queue) ![example workflow](https://github.com/grimmer0125/d4c-queue/actions/workflows/node.js.yml/badge.svg) [![Coverage Status](https://coveralls.io/repos/github/grimmer0125/d4c-queue/badge.svg?branch=master)](https://coveralls.io/github/grimmer0125/d4c-queue?branch=master)
44

5-
Wrap an [async](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)/[promise-returning](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)/`sync` function as a queue-ready async function, which is enqueued while being called. This is convenient to reuse it. Task queues execute original functions sequentially by default (synchronization mode, `concurrency limit = 1`) and allow changing concurrency limit to have concurrent tasks executed. It also supports `@synchronized` [decorator](https://www.typescriptlang.org/docs/handbook/decorators.html) on instance or static methods. Passing arguments and using `await` to get return values are also supported.
5+
Wrap an [async](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)/[promise-returning](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)/`sync` function as a queue-ready async function, which is enqueued while being called. This is convenient to reuse it. Task queues execute original functions sequentially by default (synchronization mode, `concurrency limit = 1`) and allow changing concurrency limit to have concurrent tasks executed. It also supports `@synchronized`/`@concurrent` [decorator](https://www.typescriptlang.org/docs/handbook/decorators.html) on instance or static methods. Passing arguments and using `await` to get return values are also supported.
66

77
## Features
88

@@ -128,9 +128,9 @@ d4c.apply(syncFun, { args: ['syncFun_arg1'] });
128128

129129
Is it useful for rate-limiting tasks. For example, setup some concurrency limit to avoid send GitHub GraphQL API requests too fast, since it has rate limits control.
130130

131-
**Default concurrency limit of D4C instance** is `1` in this library.
131+
Default concurrency limit of D4C instance is `1` in this library.
132132

133-
**Usage**:
133+
Usage:
134134

135135
```ts
136136
/** change concurrency limit applied on default queues */

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "d4c-queue",
33
"version": "1.6.0",
4-
"description": "A task queue executes tasks sequentially or concurrently. Wrap an async/promise-returning/sync function as a queue-ready async function for convenient reuse. Support passing arguments/getting return value, @synchronized decorator, Node.js, Browser, JS, TS.",
4+
"description": "A task queue executes tasks sequentially or concurrently. Wrap an async/promise-returning/sync function as a queue-ready async function for easier reusing. Support passing arguments/getting return value, @synchronized/@concurrent decorator, Node.js/Browser.",
55
"main": "build/main/index.js",
66
"typings": "build/main/index.d.ts",
77
"module": "build/module/index.js",

0 commit comments

Comments
 (0)