Sha256: 01fbe22aa8a44b83d8d08edd89220ee6c6bb360c2f0bd7a0d42798df91687bf6
Contents?: true
Size: 563 Bytes
Versions: 14
Compression:
Stored size: 563 Bytes
Contents
var io = new RocketIO().connect(); var linda = new Linda(io); var ts = new linda.TupleSpace("calc"); $(function(){ $("#btn_request").click(function(){ var query = $("#txt_request").val(); ts.write(["calc_request", query]); }); }); var take_result = function(){ ts.take(["calc_result"], function(tuple){ var result = tuple[1]; $("#log").prepend( $("<p>").text(result) ); take_result(); }); }; io.on("connect", take_result); io.on("connect", function(){ ts.watch(["calc_request"], function(tuple){ console.log(tuple); }); });
Version data entries
14 entries across 14 versions & 1 rubygems