Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fiber/coroutine support for v8 and node.
C C++ JavaScript Python

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
LICENSE
Makefile
README
coroutine.cc
coroutine.h
fiber-shim
node-fibers.cc

README

Fiber support for Node and v8.

To build this software:

  make

Only OS X is supported right now.

If you intend to use fibers, be sure to start node with the included
`fiber-shim` script. This is a quick example of what you can do with
node-fibers:

  $ cat generator.js 
  var util = require('util');
  var Fiber = require('./node-fibers').Fiber;

  var inc = Fiber(function(start) {
    var total = start;
    while (true) {
      total += this.yield(total);
    }
  });

  for (var ii = inc.run(1); ii < 10; ii = inc.run(1)) {
    util.print(ii + '\n');
  }

  $ ./fiber-shim node generator.js 
  1
  2
  3
  4
  5
  6
  7
  8
  9
Something went wrong with that request. Please try again.