meteorhacks / meteor-async

Set of async utilities to work with NPM modules inside Meteor
MIT License
63 stars 4 forks source link

If multiple users are trying to access one method, how to make use of it at a time one user only? #9

Open mesameen opened 8 years ago

mesameen commented 8 years ago

If multiple users are trying to access one method, how to make use of it at a time one user only?

eg:

Meteor.methods({

getSession: function() { var session = Session.findOne({_id:'abc'}); if(session !== undefined){ var sessionId = session._id; return sessionId; } }

});

How to use lock concept, in this scenario?