$.Mutex = (function() {
function Mutex() {
this.def = $.Deferred().resolve();
}
Mutex.prototype.exec = function(action) {
var current = this.def;
var next = this.def = $.Deferred();
return current.then(function() {
return $.when(action()).always(function() {
next.resolve();
});
});
};
return Mutex;
})();
慕丝7291255
潇潇雨雨
摇曳的蔷薇
随时随地看视频慕课网APP
相关分类