Perform a linking request with another actor
432429
def linking_request(receiver, type)
      Celluloid.exclusive do
        receiver.mailbox << LinkingRequest.new(Actor.current, type)
        system_events = []

        Timers::Wait.for(LINKING_TIMEOUT) do |remaining|
          begin
            message = @mailbox.receive(remaining) do |msg|
              msg.is_a?(LinkingResponse) &&
                msg.actor.mailbox.address == receiver.mailbox.address &&
                msg.type == type
            end
          rescue TaskTimeout
            next # IO reactor did something, no message in queue yet.
          end

          if message.instance_of? LinkingResponse
            # !!! DO NOT INTRODUCE ADDITIONAL GLOBAL VARIABLES !!!
            # rubocop:disable Style/GlobalVars
            Celluloid::Probe.actors_linked(self, receiver) if $CELLULOID_MONITORING
            # rubocop:enable Style/GlobalVars
            system_events.each { |ev| @mailbox << ev }
            return
          elsif message.is_a? SystemEvent
            # Queue up pending system events to be processed after we've successfully linked
            system_events << message
          else raise "Unexpected message type: #{message.class}. Expected LinkingResponse, NilClass, SystemEvent."
          end
        end

        raise TaskTimeout, "linking timeout of #{LINKING_TIMEOUT} seconds exceeded with receiver: #{receiver}"
      end
    end
884762
def linkfetch(self):
        "
        request, handle = self.open()
        self._add_headers(request)
        if handle:
            self._get_crawled_urls(handle, request)
72944
def param_request_list_send(self, target_system, target_component, force_mavlink1=False):
                '''
                

                '''
                return self.send(self.param_request_list_encode(target_system, target_component), force_mavlink1=force_mavlink1)
944527
function linkListeners(action)
                            {
                              if(post[action.type]) post[action.type].apply(post,action.args);
                            }
653018
def select(self, cls, **kwargs):
        
        name = qualname(cls)
        id = first_reply(
            self.scatter('select', {'cls': name}, limit=1), cls)
        return ActorProxy(name, id, agent=self,
                          connection=self.connection, **kwargs)
720657
def comicPageLink(self, comic, url, prevUrl):
        """"""
        for handler in _handlers:
            handler.comicPageLink(comic, url, prevUrl)
315712
def create_link_to(block, url, remote, method = nil, confirm = nil)
      if remote
        return link_to(block, url, :method => method, :confirm => confirm, :remote => true)
      end
      link_to(block, url, :method => method, :confirm => confirm)
    end
665553
function follow (cid, links, err, obj) {
      if (err) {
        return cb(err)
      }

      if (!links.length) {
        // done tracing, obj is the target node
        return cb(null, cid.buffer)
      }

      const linkName = links[0]
      const nextObj = obj.links.find(link => link.name === linkName)
      if (!nextObj) {
        return cb(new Error(
          `no link named "${linkName}" under ${cid.toBaseEncodedString()}`
        ))
      }

      objectAPI.get(nextObj.cid, follow.bind(null, nextObj.cid, links.slice(1)))
    }
898781
def link(**kwargs):
  '''  '''
  
  if kwargs['yes']:
    output, err = cli_syncthing_adapter.link(**kwargs)
    click.echo("%s" % output, err=err)
  else:
    if click.confirm("Are you sure you want to link %s?" % kwargs['path']):
      output, err = cli_syncthing_adapter.link(**kwargs)
      click.echo("%s" % output, err=err)
529283
def gopro_get_request_send(self, target_system, target_component, cmd_id, force_mavlink1=False):
                '''
                

                '''
                return self.send(self.gopro_get_request_encode(target_system, target_component, cmd_id), force_mavlink1=force_mavlink1)
793237
function(self, agent, id, cb) {
  let msg = {action: 'subscribe', id: id};
  agent.request(Constants.KEYWORDS.MASTER_WATCHER, msg, function(err, servers) {
    if(err) {
      logger.error('subscribeRequest request to master with error: %j', err.stack);
      utils.invokeCallback(cb, err);
    }
    let res = [];
    for(let id in servers) {
      res.push(servers[id]);
    }
    addServers(self, res);
    utils.invokeCallback(cb);
  });
}
548431
def actors
      request = Message::List.new(Thread.mailbox)
      list = send_request request
      list.map!(&:to_sym)
    end
50100
def link(self, *args, **urlargs):
        ''''''
        if len(args) > 1:
            raise ValueError
        url = self.route.url(**urlargs)
        if len(args) == 1:
            text = args[0]
        else:
            text = url
        return Html('a', text, href=url)
858385
def link(self, href, **kwargs):
        """"""
        return link.Link(dict(href=href, **kwargs), self.base_uri)
1011998
def user(request, username):
    
    instance = get_object_or_404(
        USER_MODEL,
        **{'is_active': True, username_field: username}
    )
    return render(
        request,
        'actstream/actor.html',
        context={
            'ctype': ContentType.objects.get_for_model(USER_MODEL),
            'actor': instance, 'action_list': models.user_stream(instance)
        }
    )
1287178
def get_url(self, action, obj=None, domain=True):
        
        if not obj:
            url = reverse('actstream_detail', None, (action.pk,))
        elif hasattr(obj, 'get_absolute_url'):
            url = obj.get_absolute_url()
        else:
            ctype = ContentType.objects.get_for_model(obj)
            url = reverse('actstream_actor', None, (ctype.pk, obj.pk))
        if domain:
            return add_domain(Site.objects.get_current().domain, url)
        return url
1184446
def send(self, request, **kwargs):
        """"""
        # Set defaults that the hooks can utilize to ensure they always have
        # the correct parameters to reproduce the previous request.
        kwargs.setdefault('stream', self.stream)
        kwargs.setdefault('verify', self.verify)
        kwargs.setdefault('cert', self.cert)
        kwargs.setdefault('proxies', self.proxies)

        # It's possible that users might accidentally send a Request object.
        # Guard against that specific failure case.
        if not isinstance(request, PreparedRequest):
            raise ValueError('You can only send PreparedRequests.')

        checked_urls = set()
        while request.url in self.redirect_cache:
            checked_urls.add(request.url)
            new_url = self.redirect_cache.get(request.url)
            if new_url in checked_urls:
                break
            request.url = new_url

        # Set up variables needed for resolve_redirects and dispatching of hooks
        allow_redirects = kwargs.pop('allow_redirects', True)
        stream = kwargs.get('stream')
        timeout = kwargs.get('timeout')
        verify = kwargs.get('verify')
        cert = kwargs.get('cert')
        proxies = kwargs.get('proxies')
        hooks = request.hooks

        # Get the appropriate adapter to use
        adapter = self.get_adapter(url=request.url)

        # Start time (approximately) of the request
        start = datetime.utcnow()

        # Send the request
        r = adapter.send(request, **kwargs)

        # Total elapsed time of the request (approximately)
        r.elapsed = datetime.utcnow() - start

        # Response manipulation hooks
        r = dispatch_hook('response', hooks, r, **kwargs)

        # Persist cookies
        if r.history:

            # If the hooks create history then we want those cookies too
            for resp in r.history:
                extract_cookies_to_jar(self.cookies, resp.request, resp.raw)

        extract_cookies_to_jar(self.cookies, request, r.raw)

        # Redirect resolving generator.
        gen = self.resolve_redirects(r, request,
            stream=stream,
            timeout=timeout,
            verify=verify,
            cert=cert,
            proxies=proxies)

        # Resolve redirects if allowed.
        history = [resp for resp in gen] if allow_redirects else []

        # Shuffle things around if there's history.
        if history:
            # Insert the first (original) request at the start
            history.insert(0, r)
            # Get the last request made
            r = history.pop()
            r.history = history

        if not stream:
            r.content

        return r