SkillAgentSearch skills...

MicroTask

best effort nextTick shim

Install / Use

/learn @kaerus-component/MicroTask
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Build Status

microTask - A best effort nextTick shim

Synopsis

Defers a task to aid with asynchronous processing in a single threaded environment.

microtask(task:Function, args:Array, context:Object)

Execute task on next event loop / tick

  • param Function task - the function to call
  • param Array args - array of arguments
  • param Object context - task context

Example:

   function myTask(a,b,c){
      console.log(a,b,c);
   }
   microtask(myTask,["hello","world","!"]);
   // 
   doSomethingElse();
   // ...after next event tick ... => "Hello world!"

Related Skills

View on GitHub
GitHub Stars4
CategoryDevelopment
Updated8y ago
Forks1

Languages

JavaScript

Security Score

70/100

Audited on Dec 8, 2017

No findings