Skip to content

riadhchtara/kowa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kowa

Kowa core: asynchronous performance and synchronous simplicity

Install

npm install kowa

Example

var Kowa = require('kowa');

var p1 = new Promise(
  function(resolve, reject) {
    setTimeout(
      function() {
        resolve(1);
      }, Math.random() * 2000 + 1000);
});

var p2 = new Promise(
  function(resolve, reject) {
    setTimeout(
      function() {
        resolve(2);
      }, Math.random() * 2000 + 1000);
});

Kowa.spawn(function* () {
  console.log(yield p1);
  console.log(yield p2);
});

License

Apache License 2.0

Based on

http://mxr.mozilla.org/mozilla-central/source/toolkit/modules/Task.jsm

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published