unsubscribes the component from the passed channels
@param  {[string]} channels
@return {object} the subscribeConnection instance
551140
function unsubscribe (channels) {
    pullAll(_subscribedChannels, channels)
    if (_socket) channels.forEach(channel => _socket.unsubscribe(channel))
    return connection
  }
357462
function onMessageReceivedUnsubscribe() {
    self.registration.pushManager.getSubscription()
        .then(subscription => subscription.unsubscribe())
        .then(() => {
            clearLocalDatabase();
            // OPTIONALLY IMPLEMENT: Forward the unsubscription to your server here
            broadcastReply(WorkerMessengerCommand.AMP_UNSUBSCRIBE, null);
        });
}
875617
function(client, subscriptions, channel, callback, done_callback) {
    if (subscriptions[channel]===undefined)
        return;
    subscriptions[channel].splice(subscriptions[channel].indexOf(callback), 1);
    if (subscriptions[channel].length===0) {
        delete subscriptions[channel];
        client.unsubscribe(channel, function() {
            // If there is a done_callback defined, execute it
            if (done_callback!==undefined) done_callback();
        });
    }
}
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()
667598
def unsubscribe_from_hub(self, event, callback):
        
        return self._hub("unsubscribe", event, callback, github.GithubObject.NotSet)
550606
function (channel, subscription, context) {
      Backbone.Mediator.subscribe(channel, subscription, context, true);
    }
1144743
def client_end(request, socket, context):
    
    # Send the unsubscribe event prior to actually unsubscribing, so
    # that the finish event can still match channels if applicable.
    for channel in socket.channels:
        events.on_unsubscribe.send(request, socket, context, channel)
    events.on_finish.send(request, socket, context)
    # Actually unsubscribe to cleanup channel data.
    for channel in socket.channels[:]:
        socket.unsubscribe(channel)
    # Remove the client.
    del CLIENTS[socket.session.session_id]
365960
@Override
	public boolean unsubscribeAllChannels() {
        final Collection<BitfinexStreamSymbol> channels = getSubscribedChannels();
        final int channelsToUnsubscribe = channels.size();

        logger.debug("Calling unsubscribe for {} channels", channelsToUnsubscribe);
		final CountDownLatch countDownLatch = new CountDownLatch(channelsToUnsubscribe);

        try (Closeable c = callbackRegistry.onUnsubscribeChannelEvent(s -> countDownLatch.countDown())) {
            channels.forEach(symbol -> sendCommand(new UnsubscribeChannelCommand(symbol)));

            // Await the unsubscription
            countDownLatch.await(30, TimeUnit.SECONDS);

            return true;
        } catch (final InterruptedException | IOException e) {
            Thread.currentThread().interrupt();
            return false;
        }
	}
1373197
function unsubscribe(f) {
    return function () {

      // remove from fitties array
      fitties = fitties.filter(function (_) {
        return _.element !== f.element;
      });

      // stop observing DOM
      if (f.observeMutations) {
        f.observer.disconnect();
      }

      // reset font size to inherited size
      f.element.style.cssText = f.originalStyle;
    };
  }
1374137
def unsubscribe(self, socket_id, channel):
        """"""
        con = self._get_connection(socket_id, create=False)
        if con is not None:
            con.subscriptions.discard(channel)
        try:
            self.subscriptions[channel].discard(socket_id)
        except KeyError:
            pass
94128
@Override
	public Promise subscribe(String channel) {
		Promise promise = new Promise();
		if (client != null) {
			try {
				client.subscribe(new Subscription[] { new Subscription(channel, qos) });
				subscriptions.put(channel, promise);
			} catch (Exception cause) {
				promise.complete(cause);
			}
		} else {
			promise.complete(new Throwable("Not connected!"));
		}
		return promise;
	}
1083393
def unsubscribe(self, ssid, max_msgs=0):
        
        if self.is_closed:
            raise ErrConnectionClosed

        sub = None
        try:
            sub = self._subs[ssid]
        except KeyError:
            # Already unsubscribed.
            return

        # In case subscription has already received enough messages
        # then announce to the server that we are unsubscribing and
        # remove the callback locally too.
        if max_msgs == 0 or sub.received >= max_msgs:
            self._subs.pop(ssid, None)
            self._remove_subscription(sub)

        # We will send these for all subs when we reconnect anyway,
        # so that we can suppress here.
        if not self.is_reconnecting:
            yield self.auto_unsubscribe(ssid, max_msgs)
1232219
function _observeSubscriptionSyncEvents(args) {
  var rtm = args.rtm;
  var filterFn = args.filterFn;

  rtm.on('subscription-created', function(subscription) {
    if (subscription.allowRead !== true) return;

    filterFn(subscription).then(function(ok) {
      if (ok) {
        rtm.subscribe({channel: subscription.channelId});
      }
    });
  });

  rtm.on('subscription-deleted', function(subscription) {
    rtm.unsubscribe({channel: subscription.channelId});
  });

  rtm.on('subscription-updated', function(subscription) {
    if (subscription.allowRead === false) {
      return rtm.unsubscribe({channel: subscription.channelId});
    }
    filterFn(subscription).then(function(ok) {
      if (ok) {
        rtm.subscribe({channel: subscription.channelId});
      }
    });
  });
}
196017
@Override
	public void unsubscribe(String subscriptionName) throws JMSException
    {
    	externalAccessLock.readLock().lock();
    	try
		{
	        checkNotClosed();
	        if (StringTools.isEmpty(subscriptionName))
	            throw new FFMQException("Empty subscription name","INVALID_SUBSCRIPTION_NAME");
	
	        // Remove remaining subscriptions on all topics
	        engine.unsubscribe(connection.getClientID(), subscriptionName);
		}
    	finally
    	{
    		externalAccessLock.readLock().unlock();
    	}
    }
37940
function unsubscribe(message) {
		reply(proto.writeUnsubscribe(message.id));
		subscritions[message.itemName] = undefined;
		dequeueSubUnsubRequest(message.itemName);
		handleLateSubUnsubRequests(message.itemName);
		fireFirstSubUnsubEvent(message.itemName);
	}
329932
async def unsubscribe(self, container, *keys):
        '''
        
        '''
        await self._get_subscribe_connection(container)
        realkeys = []
        for k in keys:
            count = self._subscribecounter.get(k, 0)
            if count <= 1:
                realkeys.append(k)
                try:
                    del self._subscribecounter[k]
                except KeyError:
                    pass
            else:
                self._subscribecounter[k] = count - 1
        if realkeys:
            await self._protocol.execute_command(self._subscribeconn, container, 'UNSUBSCRIBE', *realkeys)
1279137
function unsubscribe(name, id, callback) {
        if (typeof name !== s_string) {
            throw new TypeError('topic name must be a string.');
        }
        if (id === undefined || id === null) {
            if (typeof callback === s_function) {
                id = callback;
            }
            else {
                delete _topics[name];
                return;
            }
        }
        if (typeof id === s_function) {
            callback = id;
            id = null;
        }
        if (id === null) {
            if (_id === null) {
                if (_topics[name]) {
                    var topics = _topics[name];
                    for (id in topics) {
                        delTopic(topics, id, callback);
                    }
                }
            }
            else {
                _id.then(function(id) {
                    unsubscribe(name, id, callback);
                });
            }
        }
        else if (Future.isPromise(id)) {
            id.then(function(id) {
                unsubscribe(name, id, callback);
            });
        }
        else {
            delTopic(_topics[name], id, callback);
        }
        if (isObjectEmpty(_topics[name])) {
            delete _topics[name];
        }
    }