firemail
标题:
spawn
[打印本页]
作者:
hechengjin
时间:
2015-11-2 17:24
标题:
spawn
const { Task: { spawn } } = require("resource://gre/modules/Task.jsm");
create: function(tableName, tableInfo) {
let self = this;
return spawn(function*(){
while (true) {
try {
return yield self.db[tableName].add(tableInfo)
} catch (error) {
tableInfo.uuid = self.generateUUID();
console.error(error);
continue;
}
}
})
},
欢迎光临 firemail (http://firemail.wang:8088/)
Powered by Discuz! X3