码迷,mamicode.com
首页 > 数据库 > 详细

nodejs高并发sql

时间:2015-07-21 12:29:43      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:

var proxy = new EventProxy();
var status = "ready";
var select = function(callback){
    proxy.once("selected",callback);
    if(status == "ready"){
        status = "pending";
        db.select("SQL", function(results){
            proxy.emit("selected",results);
            status = "ready";
        });
    }
};

nodejs高并发sql

标签:

原文地址:http://www.cnblogs.com/jjjs/p/4663626.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!