Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "Make Meteor._WriteFence available on the client as well as th…

…e server. Keep"

This reverts commit 0092a56.

The goal for _WriteFence is that it be specific to the concept of declaring when
writes are done (and one day may be a networked message bus), not that it be a
generic "call this method after these methods" helper.
  • Loading branch information...
commit e5769d7a2adf963ed7854a3e043bd89dd7400e17 1 parent 2988236
@glasser glasser authored
View
6 packages/livedata/livedata_server.js
@@ -442,12 +442,6 @@ _.extend(Meteor._LivedataSession.prototype, {
}
});
-// The current write fence. When there is a current write fence, code
-// that writes to databases should register their writes with it using
-// beginWrite().
-Meteor._CurrentWriteFence = new Meteor.EnvironmentVariable;
-
-
/******************************************************************************/
/* LivedataSubscription */
/******************************************************************************/
View
2  packages/livedata/package.js
@@ -11,7 +11,7 @@ Package.on_use(function (api) {
// manage the current set of subscriptions.
api.use('minimongo', ['client', 'server']);
- api.add_files('writefence.js', ['client', 'server']);
+ api.add_files('writefence.js', 'server');
api.add_files('crossbar.js', 'server');
api.add_files('livedata_common.js', ['client', 'server']);
View
6 packages/livedata/writefence.js
@@ -11,6 +11,11 @@ Meteor._WriteFence = function () {
self.completion_callbacks = [];
};
+// The current write fence. When there is a current write fence, code
+// that writes to databases should register their writes with it using
+// beginWrite().
+Meteor._CurrentWriteFence = new Meteor.EnvironmentVariable;
+
_.extend(Meteor._WriteFence.prototype, {
// Start tracking a write, and return an object to represent it. The
// object has a single method, committed(). This method should be
@@ -57,7 +62,6 @@ _.extend(Meteor._WriteFence.prototype, {
},
// Convenience function. Arms the fence, then blocks until it fires.
- // Only can be called on the server.
armAndWait: function () {
var self = this;
var future = new Future;
Please sign in to comment.
Something went wrong with that request. Please try again.