Permalink
Browse files

Merge pull request #279 from jrburke/bug958675-email-upgrade-alameda

Bug 958675 - [email] Upgrade alameda.js to get latest prim r=asuth
  • Loading branch information...
2 parents 4e359e8 + d1ae1e8 commit eb22d7c4c5ec6bd15488a9e1b00af0ab4cf739f9 @jrburke jrburke committed Jan 29, 2014
Showing with 398 additions and 299 deletions.
  1. +7 −1 data/lib/mailapi/allback.js
  2. +6 −1 data/lib/mailapi/cronsync.js
  3. +385 −297 deps/alameda.js
@@ -99,9 +99,15 @@ exports.allbackMaker = function allbackMaker(names, allDoneCallback) {
*/
exports.latch = function() {
var ready = false;
- var deferred = prim();
+ var deferred = {};
var results = {};
var count = 0;
+
+ deferred.promise = prim(function (resolve, reject) {
+ deferred.resolve = resolve;
+ deferred.reject = reject;
+ });
+
function defer(name) {
count++;
var resolved = false;
@@ -101,9 +101,14 @@ function makeSlice(storage, callback, parentLog) {
*/
function CronSync(universe, _logParent) {
this._universe = universe;
- this._universeDeferred = $prim();
+ this._universeDeferred = {};
this._isUniverseReady = false;
+ this._universeDeferred.promise = $prim(function (resolve, reject) {
+ this._universeDeferred.resolve = resolve;
+ this._universeDeferred.reject = reject;
+ }.bind(this));
+
this._LOG = LOGFAB.CronSync(this, null, _logParent);
this._activeSlices = [];
Oops, something went wrong.

0 comments on commit eb22d7c

Please sign in to comment.