headius/jo
Implementation of key Go (lang) features for (J)Ruby
{ "createdAt": "2013-08-17T00:32:51Z", "defaultBranch": "master", "description": "Implementation of key Go (lang) features for (J)Ruby", "fullName": "headius/jo", "homepage": null, "language": "Java", "name": "jo", "pushedAt": "2013-08-17T15:14:10Z", "stargazersCount": 65, "topics": [], "updatedAt": "2021-08-10T09:29:01Z", "url": "https://github.com/headius/jo"}A library to provide “goroutines”, “channels”, and “select” as in Go.
Installation
Section titled “Installation”Add this line to your application’s Gemfile:
gem 'jo'And then execute:
$ bundleOr install it yourself as:
$ gem install jorequire 'jo'
include Jo
# pinger ponger printerdef pinger(c) 20.times do c << 'ping' endend
def ponger(c) 20.times do c << 'pong' endend
def printer(c) 40.times do puts c.take sleep 1 endend
c = chanjo {pinger(c)}jo {ponger(c)}jo {printer(c)}
gets # prevent exitContributing
Section titled “Contributing”- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request