Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #5 from appleifreak/master

Fibers API update.
  • Loading branch information...
commit 671f22a35f42627550f2d371822dc0fa19b28229 2 parents d1b5663 + 8f4c005
@lm1 authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 fibers-promise.js
View
8 fibers-promise.js
@@ -20,7 +20,7 @@
IN THE SOFTWARE.
*/
-require('fibers');
+var Fiber = require('fibers');
function get_current_fiber() {
var f = Fiber.current;
@@ -53,7 +53,7 @@ function promise() {
};
cb.wait = function() {
while (!hasValue) {
- yield();
+ Fiber.yield();
}
return true;
};
@@ -115,7 +115,7 @@ promise.waitAny = function() {
return arguments[i];
}
}
- yield();
+ Fiber.yield();
}
}
@@ -134,7 +134,7 @@ promise.sleep = function(ms) {
fiber.run();
}, ms);
while (!wake) {
- yield();
+ Fiber.yield();
}
return undefined;
};
Please sign in to comment.
Something went wrong with that request. Please try again.