Registers an operation with a void return value.
187384
@SuppressWarnings("unchecked")
  private void registerVoidMethod(Class type, Method method) {
    executor.register(type, wrapVoidMethod(method));
  }
315486
def register(self, func, singleton=False, threadlocal=False, name=None):
        
        func._giveme_singleton = singleton
        func._giveme_threadlocal = threadlocal

        if name is None:
            name = func.__name__
        self._registered[name] = func
        return func
93085
public void registerDeferredService(BundleContext bundleContext, Class<?> providedService, Dictionary dict) {
        Object obj = serviceReg.get();
        if (obj instanceof ServiceRegistration<?>) {
            // already registered - nothing to do here
            return;
        }
        if (obj instanceof CountDownLatch) {
            // another thread is in the process of (de)registering - wait for it to finish
            try {
                ((CountDownLatch) obj).await();

                if (serviceReg.get() instanceof ServiceRegistration<?>) {
                    // Another thread has successfully registered to return out (so we don't go
                    // into recursive loop).
                    return;
                }
            } catch (InterruptedException swallowed) {
                if (tc.isDebugEnabled()) {
                    Tr.debug(tc, "Count down interrrupted", swallowed);
                }
            }
        } else {
            // This is probably the first thread to register.
            // Claim the right to register by setting a latch for other threads to wait on.
            CountDownLatch latch = new CountDownLatch(1);
            if (serviceReg.compareAndSet(null, latch)) {
                // This thread won the right to register the service
                try {
                    serviceReg.set(bundleContext.registerService(providedService.getName(), this, dict));
                    // successfully registered - nothing more to do
                    return;
                } finally {
                    // if the serviceReg was not updated for any reason, we need to set it back to null
                    serviceReg.compareAndSet(latch, null);
                    // in any case we need to allow any blocked threads to proceed
                    latch.countDown();
                }
            }
        }
        // If we get to here we have not successfully registered 
        // nor seen another thread successfully register, so just recurse.
        registerDeferredService(bundleContext, providedService, dict);
    }
500653
def declare_response(self, code='200', **kwargs):
        """"""  # noqa: E501
        self['responses'][str(code)] = self._new_operation(**kwargs)
472283
def register_single(key, value, param=None):
    ''''''
    get_current_scope().container.register(key, lambda: value, param)
43831
def register(op_name):
        """"""
        def wrapper(func):
            """Helper function to map functions"""
            try:
                import onnx as _
                MXNetGraph.registry_[op_name] = func
            except ImportError:
                pass
            return func

        return wrapper
3467
def register(self, func, *args, **kwargs):
        
        self._open[-1].append(UndoOperation(func, *args, **kwargs))
        if not (self._undoing or self._redoing):
            self._redo = []
        self.notify()
829122
private synchronized void compile(Token tok) {
		if (this.operations != null)
			return;
		this.numberOfClosures = 0;
		this.operations = this.compile(tok, null, false);
	}
641084
public synchronized int register(final String sql, final int parametersCount) {
        Integer result = statementIdAssigner.get(sql);
        if (null != result) {
            return result;
        }
        result = sequence.incrementAndGet();
        statementIdAssigner.putIfAbsent(sql, result);
        binaryStatements.putIfAbsent(result, new MySQLBinaryStatement(sql, parametersCount));
        return result;
    }
373802
static void register(Object value) {
        if (value != null) {
            Map<Object, Object> m = getRegistry();
            if (m == null) {
                REGISTRY.set(new WeakHashMap<Object, Object>());
            }
            getRegistry().put(value, null);
        }
    }
847878
protected final void declareReturnType(IndentingWriter o, List<IType> intermediates, boolean usesDefaltValues) throws BindingException {
    generateAccessModifier(o);

    if (returnType == null && intermediates == null) {
      o.print("void ");
    } else {
      // we assume that the [retval] param to be passed by reference
      TypeBinding retBinding = TypeBinding.bind(g, returnType, null);

      // add @ReturnValue if necessary
      if ((!retBinding.isDefault && needsMarshalAs()) || (retParam != -1 && (params[retParam].isIn() || retParam != params.length - 1))
          || intermediates != null
          || usesDefaltValues) {
        o.print("@ReturnValue(");
        o.beginCommaMode();
        if (!retBinding.isDefault && needsMarshalAs()) {
          o.comma();
          o.print("type=NativeType." + retBinding.nativeType.name());
        }
        if (retParam != -1 && params[retParam].isIn()) {
          o.comma();
          o.print("inout=true");
        }
        if (retParam != -1 && retParam != params.length - 1 || usesDefaltValues) {
          o.comma();
          o.print("index=" + retParam);
        }

        if (intermediates != null) {
          o.comma();
          o.print("defaultPropertyThrough={");
          o.beginCommaMode();
          for (IType im : intermediates) {
            TypeBinding vb = TypeBinding.bind(g, im, null);
            o.comma();
            o.print(vb.javaType);
            o.print(".class");
          }
          o.endCommaMode();
          o.print("}");
        }

        o.endCommaMode();
        o.println(")");
      }

      o.print(retBinding.javaType);
      o.print(' ');
    }
  }
269839
def register(self, value):
        
        if self.env is None:
            raise PluginException('The plugin must be installed to application.')

        def wrapper(func):
            name = func.__name__
            if isinstance(value, str):
                name = value
            if callable(func):
                self.env.globals[name] = func
            return func

        if callable(value):
            return wrapper(value)

        return wrapper
732045
def make_result(self, key, value):
        
        v = OperationResult()
        v.key = key
        return v
1005788
public final void insertOp(Operation op) {
    ArrayList<Operation> tmp = new ArrayList<Operation>(inputQueue.size() + 1);
    tmp.add(op);
    inputQueue.drainTo(tmp);
    inputQueue.addAll(tmp);
  }
741723
def register(self, name):
        """"""
        def decorator(func):
            """Register decorated function."""
            self[name] = func
            return func

        return decorator
927348
@Override
    public void register(BindingRegisterContext<JsonArray> ctx) throws SQLException {
        ctx.statement().registerOutParameter(ctx.index(), Types.VARCHAR);
    }
1200758
public void register(Object value) {
        if (JSONzip.probe) {
            int integer = find(value);
            if (integer >= 0) {
                JSONzip.log("\nDuplicate key " + value);
            }
        }
        if (this.length >= this.capacity) {
            compact();
        }
        this.list[this.length] = value;
        this.map.put(value, this.length);
        this.ticks[this.length] = 1;
        if (JSONzip.probe) {
            JSONzip.log("<" + this.length + " " + value + "> ");
        }
        this.length += 1;
    }