Skip to content

⚠ BREAKING CHANGES

Compare
Choose a tag to compare
@grimmerk grimmerk released this 05 May 04:45
· 150 commits to master since this release
  • 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() {}
}