function called when the object is release or cancelled
175717
function (event) {
        this.setOpacity(0.25);
        if (this.cursors.left === true) {
            me.input.triggerKeyEvent(me.input.KEY.LEFT, false);
            this.cursors.left = false;
        }
        if (this.cursors.right === true) {
            me.input.triggerKeyEvent(me.input.KEY.RIGHT, false);
            this.cursors.right = false;
        }
        this.joypad_offset.set(0, 0);
        return false;
    }
225335
function release(requestorId, task) {
  if(!requestorId) {
    throw new TypeError('RequestorIdNotPresent');
  }
  if(!task) {
    throw new TypeError('TaskNotPresent');
  }

  var semaphore   = task.semaphore;

  // Task isn't locked, it's already released.
  if(!semaphore) {
    return task;
  }

  var key         = hashKey(requestorId, task.id);

  if(semaphore.key !== key) {
    throw new LockError('KeyInvalid');
  }

  task.semaphore  = null;

  return task;
}
550985
public void release(Collection<T> release)
    {
        List<Ref<T>> refs = new ArrayList<>();
        List<T> notPresent = null;
        for (T obj : release)
        {
            Ref<T> ref = references.remove(obj);
            if (ref == null)
            {
                if (notPresent == null)
                    notPresent = new ArrayList<>();
                notPresent.add(obj);
            }
            else
            {
                refs.add(ref);
            }
        }

        IllegalStateException notPresentFail = null;
        if (notPresent != null)
        {
            notPresentFail = new IllegalStateException("Could not release references to " + notPresent
                                                       + " as references to these objects were not held");
            notPresentFail.fillInStackTrace();
        }
        try
        {
            release(refs);
        }
        catch (Throwable t)
        {
            if (notPresentFail != null)
                t.addSuppressed(notPresentFail);
        }
        if (notPresentFail != null)
            throw notPresentFail;
    }
1185713
protected void release(BaseEvent event) {
        Info info = events.get(event);
        if (info != null) {
            if (info.refcount.decrementAndGet() == 0) {
                events.remove(event);
            }
        } else {
            log.warn("Release called on already released event.");
        }
    }
169977
function(obj, name, callback) {
      var listeners = this._listeners;
      if (!listeners) return this;
      var deleteListener = !name && !callback;
      if (typeof name === 'object') callback = this;
      if (obj) (listeners = {})[obj._listenerId] = obj;
      for (var id in listeners) {
        listeners[id].off(name, callback, this);
        if (deleteListener) delete this._listeners[id];
      }
      return this;
    }
497673
private T getAndClearUnderLock() throws Throwable {
    if(error != null) {
      throw error;
    } else {    
      // Return and clear current
      T retValue = data;
      data = null;
      return retValue;
    }
  }
377248
def halted_objects(self):
        """"""
        return [obj for obj in self.database_objects
                if obj.status in [obj.known_statuses.HALTED]]
246889
function (type, obj, func) {
        if (obj == null)  {
            obj = this.object;
        }
        var listeners = this.listeners[type];
        if (listeners != null) {
            for (var i=0, len=listeners.length; i<len; i++) {
                if (listeners[i].obj == obj && listeners[i].func == func) {
                    listeners.splice(i, 1);
                    break;
                }
            }
        }
    }
1101327
function (obj) {
  printHelpOnExit = false;
  if (_.isError(obj)) {
    console.error(obj);
  } else {
    console.error(`ERROR: ${obj.toString()}`);
  }
  if (theUfo) theUfo.disconnect();
  process.exitCode = 1;
}
1107477
function ensureDestroy(callback) {
    app.prompt.get(['destroy'], function (err, result) {
      if (result.destroy !== 'yes' && result.destroy !== 'y') {
        app.log.warn('Destructive operation cancelled');
        return callback(true);
      }

      callback();
    });
  }
655666
function dispose() {
        if (this.disposed || !this.currentDisposable) {
            return;
        }
        this.disposed = true;

        // If the current disposable fulfills the disposable interface or just
        // a disposable function.
        var currentDisposable = this.currentDisposable;
        if (currentDisposable.dispose) {
            currentDisposable.dispose();
        }

        else {
            currentDisposable();
        }
    }
38999
function(event) {
                if(event.preventDefault && event.cancelable)
                    event.preventDefault();
                else
                    event.returnValue = false;
            }
1056342
function transitionOutAndRemove(response, isCancelled, opts) {

          // abort if the show() and compile failed
          if (!element) return $q.when(false);

          options = angular.extend(options || {}, opts || {});
          options.cancelAutoHide && options.cancelAutoHide();
          options.element.triggerHandler('$mdInterimElementRemove');

          if (options.$destroy === true) {

            return hideElement(options.element, options).then(function(){
              (isCancelled && rejectAll(response)) || resolveAll(response);
            });

          } else {
            $q.when(showAction).finally(function() {
              hideElement(options.element, options).then(function() {
                isCancelled ? rejectAll(response) : resolveAll(response);
              }, rejectAll);
            });

            return self.deferred.promise;
          }


          /**
           * The `show()` returns a promise that will be resolved when the interim
           * element is hidden or cancelled...
           */
          function resolveAll(response) {
            self.deferred.resolve(response);
          }

          /**
           * Force the '$md<xxx>.show()' promise to reject
           */
          function rejectAll(fault) {
            self.deferred.reject(fault);
          }
        }
505106
function onDisconnect() {
	var rids = Object.keys( cache ),
		len = rids.length,
		i;

	// TODO: log
	console.log( process.pid, 'disconnected' );

	// Abort any pending requests...
	for ( i = 0; i < len; i++ ) {
		cache[ rids[i] ].abort();

		// TODO: log
		console.log( process.pid, 'aborting request: ', rids[ i ] );
	}
}
1023500
function (obj) {
			if (typeof connHandler === 'function')
				connHandler('disconnect');
			
			SR.Warn('disconnected... obj: ');
			SR.Warn(obj);
			
			// attempt to re-connect
			if (typeof conn_options === 'object') {
				removeEntry(currentEntry);
				currentEntry = undefined;
				SR.Warn('re-connecting websocket with options');
				SR.Warn(conn_options);
				SR.setSocketServer(conn_options);
			}
		}
713918
function(r) {
            // If DONE (cancelled), then don't do anything
            if (me._readyState === FileReader.DONE) {
                return;
            }

            // Save result
            me._result = r;

            // If onload callback
            if (typeof me.onload === "function") {
                me.onload(new ProgressEvent("load", {target:me}));
            }

            // DONE state
            me._readyState = FileReader.DONE;

            // If onloadend callback
            if (typeof me.onloadend === "function") {
                me.onloadend(new ProgressEvent("loadend", {target:me}));
            }
        }
251707
function ondone(modules) {
    self.removeListener("error", onerror);
    if (foundCallback) { self.removeListener("found", foundCallback); }
    return doneCallback(null, modules);
  }