Skip to content

Releases: grimmerk/d4c-queue

API stable version with improved tests and documentation

02 May 18:05
Compare
Choose a tag to compare

⚠ BREAKING CHANGES

05 May 04:45
Compare
Choose a tag to compare
  • 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

05 May 04:46
Compare
Choose a tag to compare

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

05 May 04:47
Compare
Choose a tag to compare

Change API to let method decorator receive an option object, like global/instance usage.
Also rename parameter, nonBlockCurr to noBlockCurr.

First release

02 May 18:05
b28dd6e
Compare
Choose a tag to compare

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() {
  }
}