Engine_sync: async -> sync. SyncEngine__sync: async/yield -> sync.

This commit is contained in:
Edward Lee 2009-06-05 15:34:32 -07:00
parent 4f22e547b2
commit 81f7652b56
2 changed files with 5 additions and 7 deletions

View File

@ -188,10 +188,10 @@ Engine.prototype = {
this._log.debug("Engine initialized");
},
sync: function Engine_sync(onComplete) {
sync: function Engine_sync() {
if (!this._sync)
throw "engine does not implement _sync method";
this._notifyAsync("sync", this.name, this._sync).async(this, onComplete);
this._notify("sync", this.name, this._sync)();
},
wipeServer: function Engimne_wipeServer(onComplete) {
@ -509,8 +509,6 @@ SyncEngine.prototype = {
},
_sync: function SyncEngine__sync() {
let self = yield;
try {
this._syncStartup();
Observers.notify("weave:engine:sync:status", "process-incoming");

View File

@ -859,7 +859,7 @@ WeaveSvc.prototype = {
}
this._log.debug("Refreshing client list");
yield Clients.sync(self.cb);
Clients.sync();
// Process the incoming commands if we have any
if (Clients.getClients()[Clients.clientID].commands) {
@ -875,7 +875,7 @@ WeaveSvc.prototype = {
}
finally {
// Always immediately push back the local client (now without commands)
yield Clients.sync(self.cb);
Clients.sync();
}
}
@ -957,7 +957,7 @@ WeaveSvc.prototype = {
_syncEngine: function WeaveSvc__syncEngine(engine) {
let self = yield;
try {
yield engine.sync(self.cb);
engine.sync();
if (!this.cancelRequested)
self.done(true);
}