(function () {
  var fibers = Npm.require('fibers');
  var future = Npm.require('fibers/future');

  blocking = function(obj, fun) {
    if (fun == null) {
      fun = obj;
      obj = null;
    }
    var wrapped = future.wrap(fun);
    return function() {
      return wrapped.apply(obj, arguments).wait();
    };
  };
})();

(function () {
  var fibers = Npm.require('fibers');
  var future = Npm.require('fibers/future');

  blocking = function (obj, fun) {
    if (fun == null) {
      fun = obj;
      obj = null;
    }
    var wrapped = future.wrap(fun);
    var f = function () {
      return wrapped.apply(obj, arguments).wait();
    };
    f._blocking = true;
    return f;
  };
})();

Mark blocked functions as such for easier testing.
Mark blocked functions as such for easier testing.
