calling the callback in between is convenient.
323389
public void dhtPutItem(byte[] publicKey, byte[] privateKey, Entry entry, byte[] salt) {
        s.dht_put_item(Vectors.bytes2byte_vector(publicKey),
                Vectors.bytes2byte_vector(privateKey),
                entry.swig(),
                Vectors.bytes2byte_vector(salt));
    }
143074
function callbackWith() {
  this._callbackWith = [];
  var length = arguments.length;
  for (var i = 0; i < length; i++) {
    var arg = arguments[i];
    this._callbackWith.push(arg);
  }
  return this;
}
1207244
def _invoke_callbacks(self, *args, **kwargs):
        """"""
        for callback in self._done_callbacks:
            _helpers.safe_invoke_callback(callback, *args, **kwargs)
1195193
def callback(self, callback, *args, **kwds):
        
        return self << _CloseDummy(callback, args, kwds)
704747
function(callback, a, b) {
       return callback.length == 1 ? callback(b) : callback(a, b)
     }
792796
def on_done(self):
        
        if self._d:
            self._d.callback(self)
            self._d = None
590120
function (data, callback) {
    if (typeof callback !== 'function') {
        this.debug("Registering dummy callback, because a response message is expected");
    } else {
        this.debug("Registering callback");
    }
    this.waitingCallbacks.push(callback);
    send.call(this, data);
}
798981
def msg_callback(self, callback):
        """"""
        if callable(callback):
            self._msg_callback = callback
        else:
            self._msg_callback = None
664901
function(callback) {
			var timeout = window.setTimeout(function(){
				callback();
			},2000);
			window.onload = function(){
				clearTimeout(timeout);
				callback();
			};
		}
37460
def callback(self):
        ''''''
        self._callback(*self._args, **self._kwargs)
        self._last_checked = time.time()
1189344
function() {
    var callbacks = this._callbacks;
    var contexts = this._contexts;
    if (callbacks) {
      ("production" !== "development" ? invariant(
        callbacks.length === contexts.length,
        'Mismatched list of contexts in callback queue'
      ) : invariant(callbacks.length === contexts.length));
      this._callbacks = null;
      this._contexts = null;
      for (var i = 0, l = callbacks.length; i < l; i++) {
        callbacks[i].call(contexts[i]);
      }
      callbacks.length = 0;
      contexts.length = 0;
    }
  }
832727
def _call_wrapper(self, time, function, *args):
        """"""
        # execute the function
        function(*args)
        if function in self._callback.keys():
            repeat = self._callback[function][1]
            if repeat:
                # setup the call back again and update the id
                callback_id = self.tk.after(time, self._call_wrapper, time, function, *args)
                self._callback[function][0] = callback_id
            else:
                # remove it from the call back dictionary
                self._callback.pop(function)
918752
function recomputeCallback(){
  var len = TO_CALL.length;
  CALL_TIMEOUT = null;
  while(len--){
    (TO_CALL.shift() || NOOP).call();
  }

  TO_CALL.added = {};
}
51770
def __callbacks(self, msg):
            ''''''
            if self.callback:
                self.callback(msg, *self.callback_args, **self.callback_kwargs)
242782
function(callback){
        callback = callback || noop;

        if(!this._client){
            return callback();
        }
        this._client.shutdown(function(err){
            if(!this._define_connection){
                return callback(err);
            }
            this._define_connection.shutdown(function(derr){
                callback(err || derr);
            });
        }.bind(this));
    }
174336
function throttle(callback, delay) {
    var previousCall = new Date().getTime();
    return function() {
      var time = new Date().getTime();

      if ((time - previousCall) >= delay) {
        previousCall = time;
        callback.apply(null, arguments);
      }
    };
  }
1044611
def make_call_with_cb(self, fun, *args):
        """"""

        cid, event = self.handler.register_callback()
        argscp = list(args)
        argscp.append(cid)
        self.make_call(fun, *argscp)
        return event