Comparing version 0.4.1 to 0.4.2
@@ -12,5 +12,13 @@ /* Copyright 2015, Wang Wenlin */ | ||
go(function* (ch) { | ||
var r1 = yield db.query('SELECT 1', ch); | ||
var r2 = yield db.query('SELECT 2', ch); | ||
s3.fetch('foo/bar!full', 'inmemory', ch); | ||
s3.convert('-resize 50%', yield, ch); | ||
s3.put('foo/bar!thumb', yield, ch); | ||
var r1 = yield ch; | ||
db.query('SELECT 1', ch); | ||
var r2 = yield ch; | ||
request('http://www.google.com', ch); | ||
var [resp, body] = yield ch; | ||
redis.hget('k1', ch); | ||
@@ -21,11 +29,8 @@ redis.get('k2', ch); | ||
request('http://www.google.com', ch); | ||
var [resp, body] = yield ch; | ||
go(function* (ch2) { | ||
db.query('SELECT 1', bind(ch2, 'r3')); | ||
db2.query('SELECT 3', bind(ch2, 'r4')); | ||
var rx = yield; | ||
var ry = yield; | ||
ch(null, rx[1] + ry[1]); | ||
var [id, rx] = yield; | ||
var [id, ry] = yield; | ||
ch(null, rx + ry); | ||
}); | ||
@@ -37,3 +42,3 @@ | ||
// Free channel | ||
// Channel | ||
var ch3 = Channel(); | ||
@@ -40,0 +45,0 @@ |
{ | ||
"name": "gojs", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "go.js, Golang like channels, goroutine and go.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -13,5 +13,13 @@ go.js, Golang like channels, goroutine and go. | ||
go(function* (ch) { | ||
var r1 = yield db.query('SELECT 1', ch); | ||
var r2 = yield db.query('SELECT 2', ch); | ||
s3.fetch('foo/bar!full', 'inmemory', ch); | ||
s3.convert('-resize 50%', yield, ch); | ||
s3.put('foo/bar!thumb', yield, ch); | ||
var r1 = yield ch; | ||
db.query('SELECT 1', ch); | ||
var r2 = yield ch; | ||
request('http://www.google.com', ch); | ||
var [resp, body] = yield ch; | ||
redis.hget('k1', ch); | ||
@@ -22,11 +30,8 @@ redis.get('k2', ch); | ||
request('http://www.google.com', ch); | ||
var [resp, body] = yield ch; | ||
go(function* (ch2) { | ||
db.query('SELECT 1', bind(ch2, 'r3')); | ||
db2.query('SELECT 3', bind(ch2, 'r4')); | ||
var rx = yield; | ||
var ry = yield; | ||
ch(null, rx[1] + ry[1]); | ||
var [id, rx] = yield; | ||
var [id, ry] = yield; | ||
ch(null, rx + ry); | ||
}); | ||
@@ -38,3 +43,3 @@ | ||
// Free channel | ||
// Channel | ||
var ch3 = Channel(); | ||
@@ -41,0 +46,0 @@ |
13469
385
56