rb_delimcc

delimited continuations for ruby (build upon callcc)

BSD-3-CLAUSE License

Downloads
7.9K
Stars
3
Committers
1

Introduction

rb_delimcc adds support for delimited continuations build upon callcc.

Installation

Install Gem

rb_delimcc is available via rubygems.org and be installed using rubygems:

$ gem install rb_delimcc

Install From Source

  1. get the source

  2. install the gem (in source directory):

    $ gem build rb_delimcc.gemspec $ sudo gem install rb_delimcc

Usage:

To use rb_prob you need to use rubygems and require the library:

require 'rubygems'

require 'delimcc'
include DelimCC # optional, but will save some typing

The only functions you will need are 'reset' and 'shift'.

Examples

some simple examples can be found in examples/testcc.rb . Just run the file with 'ruby testcc.rb', to find out how delimcc works.

Limitations

delimcc is build upon callcc, so if your ruby implementation of choice has no proper call/cc support build in, delimited continuations won't work then.