Creates a callback for the rlbot status, uses default function if callback is none.
        :param callback:
        :return:
503406
def create_status_callback(self, callback=None):
        
        if callback is None:
            return self.callback_func

        def safe_wrapper(id, rlbotstatsus):
            callback(rlbotstatsus)

        return self.game_status_callback_type(wrap_callback(safe_wrapper))
986394
def callback_checkbox(attr, old, new):
    ''''''
    import numpy

    for i in range(len(lines)):
        lines[i].visible = i in param_checkbox.active
        scats[i].visible = i in param_checkbox.active

    return None
133273
def response(self, callback=None):
        
        if not callback:
            callback = type(self).AdvancedJsonify
        resp = {
            "status": "error",
            "message": self.message
        }
        if self.step:
            resp["step"] = self.step

        self.LOGGER.error(self.message, extra={"step": self.step, "context": self.context})
        return callback(resp, status_code=self.code)
37460
def callback(self):
        ''''''
        self._callback(*self._args, **self._kwargs)
        self._last_checked = time.time()
1216558
def _threaded_callback(callback, *args):
    
    t = Thread(target=callback, args=args)
    t.daemon = True
    t.start()
697012
def add_callback(self, callback: callable):
        
        def internal_callback(*args):
            try:
                callback()
            except TypeError:
                callback(self.get())

        self._var.trace('w', internal_callback)
1025727
def add_callback(self, name, func):
        

        if name not in self.callbacks:
            raise ValueError("Unknown callback name: %s" % name)

        self.callbacks[name].add(func)
495835
def release_callback(self, *args, **kwargs):
        
        tf = self.browser.get_current_selection()
        if not tf:
            self.statusbar.showMessage("Select a file to release, please!")
            return
        tfi = TaskFileInfo.create_from_taskfile(tf)
        checks = self.get_checks()
        cleanups = self.get_cleanups()
        comment = self.get_comment()
        r = Release(tfi, checks, cleanups, comment)
        self.statusbar.showMessage("Release in progress...")
        try:
            success = r.release()
        except OSError:
            self.statusbar.showMessage("Could not copy workfile!")
            return
        except Exception as e:
            self.statusbar.showMessage("%s" % e)
            return
        if success:
            self.statusbar.showMessage("Success!")
        else:
            self.statusbar.showMessage("Release failed!")
359939
def add_callback(self, func):
        
        if func is None: return
        func_list = to_list(func)

        if not hasattr(self, 'callback_list'):
            self.callback_list = func_list
        else:
            self.callback_list.extend(func_list)
144999
async def trigger_callback(self, sid, namespace, id, data):
        
        callback = None
        try:
            callback = self.callbacks[sid][namespace][id]
        except KeyError:
            # if we get an unknown callback we just ignore it
            self._get_logger().warning('Unknown callback received, ignoring.')
        else:
            del self.callbacks[sid][namespace][id]
        if callback is not None:
            ret = callback(*data)
            if asyncio.iscoroutine(ret):
                try:
                    await ret
                except asyncio.CancelledError:  # pragma: no cover
                    pass
565509
def add_callback(self, callback: _Callable, *args, **kwargs) -> None:
        
        self.loop.add_callback(callback, *args, **kwargs)
1004607
def set_alert_callback(self, callback):
        
        if callable(callable):
            self.http.alert_callback = functools.partial(callback, self)
        else:
            self.http.alert_callback = None
719011
def _execute_callback(async, callback):
    
    from furious.async import Async

    if not callback:
        return async.result.payload

    if isinstance(callback, Async):
        return callback.start()

    return callback()
762700
function callbackHandler(callback) {
        return function(error, data) {
            if (data === 'OK') {
                callback();
                return;
            }

            callback(error, deserializeResponse(data));
        };
    }
51770
def __callbacks(self, msg):
            ''''''
            if self.callback:
                self.callback(msg, *self.callback_args, **self.callback_kwargs)
1287620
function Callback (retType, argTypes, abi, func) {
  debug('creating new Callback');

  if (typeof abi === 'function') {
    func = abi;
    abi = undefined;
  }

  // check args
  assert(!!retType, 'expected a return "type" object as the first argument');
  assert(Array.isArray(argTypes), 'expected Array of arg "type" objects as the second argument');
  assert.equal(typeof func, 'function', 'expected a function as the third argument');

  // normalize the "types" (they could be strings, so turn into real type
  // instances)
  retType = ref.coerceType(retType);
  argTypes = argTypes.map(ref.coerceType);

  // create the `ffi_cif *` instance
  const cif = CIF(retType, argTypes, abi);
  const argc = argTypes.length;

  const callback = _Callback(cif, retType.size, argc, errorReportCallback, (retval, params) => {
    debug('Callback function being invoked')
    try {
      const args = [];
      for (var i = 0; i < argc; i++) {
        const type = argTypes[i];
        const argPtr = params.readPointer(i * ref.sizeof.pointer, type.size);
        argPtr.type = type;
        args.push(argPtr.deref());
      }

      // Invoke the user-given function
      const result = func.apply(null, args);
      try {
        ref.set(retval, 0, result, retType);
      } catch (e) {
        e.message = 'error setting return value - ' + e.message;
        throw e;
      }
    } catch (e) {
      return e;
    }
  });

  return callback;
}
667256
def __call(self):
        
        try:
            if self.__callback is not None:
                self.__callback(self.__successes, self.__errors)
        except Exception as ex:
            self.__logger.exception("Error calling back count down "
                                    "handler: %s", ex)
        else:
            self.__called = True