Releases: grimmerk/d4c-queue
Releases · grimmerk/d4c-queue
API stable version with improved tests and documentation
v1.3.4 v1.3.4
⚠ BREAKING CHANGES
- Improve queue system. Each instance/class is isolated with the others.
- API breaking change. No more global usage. no more
dApply, dWrap, and add needed@injectQ
. - back to es6 for main build.
original:
import { D4C, dApply, dWrap, synchronized } from 'd4c-queue';
/** global usage*/
const asyncFunResult = await dWrap(asyncFun, { tag: 'queue1' })(
'asyncFun_arg1',
'asyncFun_arg2'
);
/** instance usage */
const d4c = new D4C();
d4c.apply(async)
/** decorator usage */
class ServiceAdapter {
@synchronized
async connect() {}
}
becomes
import { D4C, injectQ, synchronized } from 'd4c-queue';
/** instance usage */
d4c.apply(syncFun, { args: ['syncFun_arg1'] });
/** decorator usage */
@injectQ
class ServiceAdapter {
@synchronized
async connect() {}
}
⚠ BREAKING CHANGES
Refactor API and instance method renaming
Change static method to public function:
D4C.apply -> dApply
D4C.wrap -> dWrap
D4C.synchronized -> synchronized
D4C.register -> defaultTag
Change instance method naming:
iapply -> apply
iwrap -> wrap
⚠ BREAKING CHANGES
Change API to let method decorator receive an option object, like global/instance usage.
Also rename parameter, nonBlockCurr
to noBlockCurr
.
First release
https://www.npmjs.com/package/d4c-queue/v/1.0.0
Features:
- global usage
D4C.wrap(asyncFun, { tag: "queue1" })("asyncFun_arg1", "asyncFun_arg2");
- instance usage
const d4c = new D4C();
d4c.iwrap(asyncFun, { tag: "queue1" })("asyncFun_arg1", "asyncFun_arg2");
- decorator usage.
@D4C.register(Symbol("jojo"))
class ServiceAdapter {
@D4C.synchronized
client_send_message() {
}
}