Execute a plugin array, terminating if a plugin sets its stopProcessing property.
@param plugins - the array of plugins to execute.
@param func - the function to apply to each plugin, it accepts the plugin its single parameter.
331550
function (plugins, func) {
                var idx, plugin = null;
                // iterate to process in reverse order without side-effects.
                for (idx = 1; idx <= plugins.length; idx += 1) {
                    plugin = plugins[plugins.length - idx];
                    func(plugin);
                    if (plugin.stopProcessing) {
                        break;
                    }
                }
            }
432276
def register_run_plugins(self, plugin_name, plugin_class):
        
        if plugin_name in self.registered_plugins:
            raise PluginException("Plugin {} already registered! "
                                  "Duplicate plugins?".format(plugin_name))
        self.logger.debug("Registering plugin %s", plugin_name)
        if plugin_class.get_allocators():
            register_func = self.plugin_types[PluginTypes.ALLOCATOR]
            register_func(plugin_name, plugin_class)
        self.registered_plugins.append(plugin_name)
811263
function( func ) {
				var contents = me._.contents,
					stop = false;

				for ( var i in contents ) {
					for ( var j in contents[ i ] ) {
						stop = func.call( this, contents[ i ][ j ] );
						if ( stop )
							return;
					}
				}
			}
166046
private void firePluginStarted(final Plugin plugin) {
        PluginEvent e = null;
        synchronized (listenerList) {
            for (Iterator iter = listenerList.iterator(); iter.hasNext();) {
                PluginListener l = (PluginListener) iter.next();
                if (e == null) {
                    e = new PluginEvent(plugin);
                }
                l.pluginStarted(e);
            }
        }
    }
1215719
function validatePlugins (plugins) {
  var type = typeOf(plugins);

  if (type.hasValue) {
    if (type.isArray) {
      // Make sure all the items in the array are valid plugins
      plugins.forEach(validatePlugin);
    }
    else {
      throw ono('Invalid arguments. Expected an array of plugins.');
    }
  }
}
504778
public void setFunctions(java.util.Collection<FunctionConfiguration> functions) {
        if (functions == null) {
            this.functions = null;
            return;
        }

        this.functions = new java.util.ArrayList<FunctionConfiguration>(functions);
    }
829336
function (func) {
        if (_cs.annotation(func, "clone") === null)
            while (_cs.annotation(func.caller, "clone") === true)
                func = func.caller;
        return func;
    }
1327179
@SuppressWarnings("unchecked")
    public void parallel(C context, final Outcome<C> outcome, final Function<C>... functions) {
        final C finalContext = context != null ? context : (C) EMPTY_CONTEXT;
        final CountingControl ctrl = new CountingControl(finalContext, functions);
        progress.reset(functions.length);

        Scheduler.get().scheduleIncremental(new Scheduler.RepeatingCommand() {
            @Override
            public boolean execute() {
                if (ctrl.isAborted() || ctrl.allFinished()) {
                    // schedule deferred so that 'return false' executes first!
                    Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
                        @Override
                        @SuppressWarnings("unchecked")
                        public void execute() {
                            if (ctrl.isAborted()) {
                                progress.finish();
                                outcome.onFailure(finalContext);
                            } else {
                                progress.finish();
                                outcome.onSuccess(finalContext);
                            }

                        }
                    });
                    return false;
                } else {
                    // one after the other until all are active
                    ctrl.next();
                    return true;
                }
            }
        });
    }
71479
function registerShutdownFunc($func, $args = array())
    {
        // if we are called statically, there is a potential
        // that no shutdown func is registered.  Bug #6445
        if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) {
            register_shutdown_function("_PEAR_call_destructors");
            $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true;
        }
        $GLOBALS['_PEAR_shutdown_funcs'][] = array($func, $args);
    }
888754
function(funcName, expr, sup, sub) {
                    this.callBase();
                    this.setFlag("Func");
                    this.funcName = funcName;
                    this.setOperator(new FunctionOperator(funcName));
                    this.setExpr(expr);
                    this.setSuperscript(sup);
                    this.setSubscript(sub);
                }
909618
function(func,args) {
    var type = lib.type.typeOf(func);
    if (type === "string") {
      var fargs = [];
      if (args instanceof Array) {
        fargs.push.apply(fargs,args);
      }
      fargs.push(func);
      func = Function.constructor.apply(Function,fargs);
    } else if (type === "error") {
      func = function() { throw func };
    } else if (type === "object") {
      func = new Method(null,func).toFunction();
    } else if (type === "undefined") {
      func = function() {};
    }
    var index = this.functions.length;
    this.functions.push(func);
    return index;
  }
1195139
def execute(func: types.FunctionType):
    
    spec = getfullargspec(func)
    default = spec.defaults
    arg_cursor = 0

    def get_item(name):
        nonlocal arg_cursor
        ctx = func.__globals__
        value = ctx.get(name, _undef)
        if value is _undef:
            try:
                value = default[arg_cursor]
                arg_cursor += 1
            except (TypeError, IndexError):
                raise ValueError(f"Current context has no variable `{name}`")
        return value

    return func(*(get_item(arg_name) for arg_name in spec.args))
935356
function async(func)
{
  function wrapper()
  {
    var context = this;
    var args    = arguments;
    process.nextTick(function()
    {
      func.apply(context, args);
    });
  }

  return wrapper;
}
1164520
function exec (func, context, args) {
	switch (args.length) {
		case 0: func.call(context); break;
		case 1: func.call(context, args[0]); break;
		case 2: func.call(context, args[0], args[1]); break;
		case 3: func.call(context, args[0], args[1], args[2]); break;
		case 4: func.call(context, args[0], args[1], args[2], args[3]); break;
		default: func.apply(context, args); break;
	}
}
805787
def execute(func, handler, args, kwargs):
    
    tracing = handler.settings.get('opentracing_tracing')

    with tracer_stack_context():
        if tracing._trace_all:
            attrs = handler.settings.get('opentracing_traced_attributes', [])
            tracing._apply_tracing(handler, attrs)

        return func(*args, **kwargs)
844900
private void processFunctions(String name, String text, String type,
      List<MtasCRMParserFunctionOutput> functionOutputList) {
    if (functions.containsKey(type) && functions.get(type).containsKey(name)
        && text != null) {
      MtasCRMParserFunction function = functions.get(type).get(name);
      String[] value;
      if (function.split != null) {
        value = text.split(Pattern.quote(function.split));
      } else {
        value = new String[] { text };
      }
      for (int c = 0; c < value.length; c++) {
        boolean checkedEmpty = false;
        if (value[c].equals("")) {
          checkedEmpty = true;
        }
        if (function.output.containsKey(value[c])) {
          ArrayList<MtasCRMParserFunctionOutput> list = function.output
              .get(value[c]);
          for (MtasCRMParserFunctionOutput listItem : list) {
            functionOutputList.add(listItem.create(value[c]));
          }
        }
        if (!checkedEmpty && function.output.containsKey("")) {
          ArrayList<MtasCRMParserFunctionOutput> list = function.output.get("");
          for (MtasCRMParserFunctionOutput listItem : list) {
            functionOutputList.add(listItem.create(value[c]));
          }
        }
      }
    }
  }
594304
function ( fn, context ) {

		// Initialize variables
		this.state = Promise.STATE.INITIALIZED;
		this.handlers = [];
		this.value = fn;

		// Rebind control functions to be run always on this promise
		this.resolve = this.resolve.bind( this );
		this.fulfill = this.fulfill.bind( this );
		this.reject = this.reject.bind( this );

		// Set fn and context
		if ( fn ) {
			if ( typeof fn !== 'function' ) throw new TypeError("fn is not a function");

			this.fn = fn;
			this.context = context || this;

			this.run();

		}

		return this;
	}