Unsubscribe to some topic.
483445
def unsubscribe(self, topic):
        """"""
        if self.sock == NC.INVALID_SOCKET:
            return NC.ERR_NO_CONN
        
        self.logger.info("UNSUBSCRIBE: %s", topic)
        return self.send_unsubscribe(False, [utf8encode(topic)])
1312466
public void unsubscribe() {
        final long id = Thread.currentThread().getId();
        queues.remove(id);
        if (subscriberIdentifiers != null) {
            for (Iterator<Entry<Object, Long>> iterator = subscriberIdentifiers.entrySet().iterator(); iterator.hasNext(); ) {
                if (id == iterator.next().getValue()) {
                    iterator.remove();
                    break;
                }
            }
        }
    }
990672
public function unsubscribe()
    {
        if ($this->type != "subscription") {
            throw new Exceptions\ChannelException("The current user is not subscribed to this channel.");
        }

        Connection::sendCurlRequest(Connection::URL_SUBSCRIPTIONS . '/' . $this->iden, 'DELETE', null, false,
            $this->apiKey);
    }
17721
public void unsubscribe(Class<? extends Subscriber> subscriberType) {
        for (ArrayList<Class<? extends Subscriber>> list : subscriptionMap.values()) {
            list.remove(subscriberType);
        }
    }
902856
public void removeTopic(String topic)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "removeTopic", topic);

    if (_subscriptionState == null)
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        SibTr.debug(tc, "removeTopic", "Topic not found");
    }
    else
      _subscriptionState.removeTopic(topic);

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "removeTopic");
  }
639301
def unsubscribe(*topics)
      topics = topics.first if topics.is_a?(Enumerable) && topics.count == 1

      packet = MQTT::Packet::Unsubscribe.new(
        :topics => topics,
        :id => next_packet_id
      )
      send_packet(packet)
    end
509426
def can_unsubscribe_from_topic(self, topic, user):
        
        # A user can unsubscribe from topics if they are authenticated and if they have the
        # permission to read the related forum. Of course a user can unsubscribe only if they are
        #  already a subscriber of the considered topic.
        return (
            user.is_authenticated and
            topic.has_subscriber(user) and
            self._perform_basic_permission_check(topic.forum, user, 'can_read_forum')
        )
138192
def _del_subscription(self, a_filter, session):
        
        deleted = 0
        try:
            subscriptions = self._subscriptions[a_filter]
            for index, (sub_session, qos) in enumerate(subscriptions):
                if sub_session.client_id == session.client_id:
                    self.logger.debug("Removing subscription on topic '%s' for client %s" %
                                      (a_filter, format_client_message(session=session)))
                    subscriptions.pop(index)
                    deleted += 1
                    break
        except KeyError:
            # Unsubscribe topic not found in current subscribed topics
            pass
        finally:
            return deleted
208926
void processUnsubscribe(ServerChannel session, String clientID, List<String> topics, int messageID) {
        Log.trace("processUnsubscribe invoked, removing subscription on topics {}, for clientID <{}>", topics, clientID);

        for (String topic : topics) {
            subscriptions.removeSubscription(topic, clientID);
        }
        //ack the client
        UnsubAckMessage ackMessage = new UnsubAckMessage();
        ackMessage.setMessageID(messageID);

        Log.trace("replying with UnsubAck to MSG ID {}", messageID);
        session.write(ackMessage);
    }
490597
async def unsubscribe(self, topic):
        
        if self.socket_type not in {SUB, XSUB}:
            raise AssertionError(
                "A %s socket cannot unsubscribe." % self.socket_type.decode(),
            )

        # Do this **BEFORE** awaiting so that new connections created during
        # the execution below honor the setting.
        self._subscriptions.remove(topic)
        tasks = [
            asyncio.ensure_future(
                peer.connection.local_unsubscribe(topic),
                loop=self.loop,
            )
            for peer in self._peers
            if peer.connection
        ]

        if tasks:
            try:
                await asyncio.wait(tasks, loop=self.loop)
            finally:
                for task in tasks:
                    task.cancel()
990026
def unsubscribe(self, event):
        """"""
        # TODO: Automatic Unsubscription
        uuids = event.data

        if not isinstance(uuids, list):
            uuids = [uuids]

        result = []

        for uuid in uuids:
            if uuid in self.subscriptions:
                self.subscriptions[uuid].pop(event.client.uuid)

                if len(self.subscriptions[uuid]) == 0:
                    del (self.subscriptions[uuid])

                result.append(uuid)

        result = {
            'component': 'hfos.events.objectmanager',
            'action': 'unsubscribe',
            'data': {
                'uuid': result, 'success': True
            }
        }

        self._respond(None, result, event)
1067296
function() {
    this.unsubscribeAll();
    
    // Column is late-binding in attach()
    var oColumn = this.getColumn();
    if(oColumn) {
        oColumn.editor = null;
    }
    
    var elContainer = this.getContainerEl();
    Ev.purgeElement(elContainer, true);
    elContainer.parentNode.removeChild(elContainer);
}
686700
function removeSubscriber (args, token) {
    var
      topics = args.topics,
      suspendSubs = args.suspend;

    if (typeof token === 'string') {
      return !!applyTopicDescendents(
        suspendSubs ? suspendTopic : empty, 'subscriptions', token, topics
      );
    }

    var node = ancestorTopicSearch(token.topic, topics);
    if (node.topic !== token.topic) {
      return false;
    }

    var i = searchAround(
      getId, getPriority,
      token.id, token.priority,
      binaryIndexBy(getPriority, token.priority, node.subscriptions),
      node.subscriptions
    );

    if (i === -1) {
      return false;
    }

    if (suspendSubs) {
      return !!suspendNode(node.subscriptions[i]);
    }

    return !!node.subscriptions.splice(i, 1);
  }
364732
def unsubscribe(request, message_id, dispatch_id, hashed, redirect_to=None):
    
    return _generic_view(
        'handle_unsubscribe_request', sig_unsubscribe_failed,
        request, message_id, dispatch_id, hashed, redirect_to=redirect_to
    )
736526
def unbind(topic, func):
    
    if topic in _receivers:
        receivers = _receivers[topic]
        for i in range(len(receivers)-1, -1, -1):
            nice, f = receivers[i]
            if (callable(func) and f['func'] == func) or (f['func_name'] == func):
                del receivers[i]
                return
1311825
def unsubscribe(self, subscriber: 'Subscriber') -> None:
        
        # here is a special implementation which is replacing the more
        # obvious one: self._subscriptions.remove(subscriber) - this will not
        # work because list.remove(x) is doing comparision for equality.
        # Applied to publishers this will return another publisher instead of
        # a boolean result
        for i, _s in enumerate(self._subscriptions):
            if _s is subscriber:
                self._subscriptions.pop(i)
                return
        raise SubscriptionError('Subscriber is not registered')
1298761
public void removeSubscriptions() {
        for (TopicSubscriber subscriber : subscribers.values()) {
            try {
                subscriber.close();
            } catch (Throwable e) {
                log.debug("Error closing subscriber", e);//is level appropriate - previously hidden exception -afranken
            }
        }
        
        subscribers.clear();
    }