Attempt to physically unlink the receiver if appropriate.
MUST BE CALLED UNDER _parent MONITOR.
552511
private final void _tryUnlink() {
        if (0 >= _cursorCount && _state == LOGICALLY_UNLINKED) {
            _previousLink._nextLink = _nextLink;
            _nextLink._previousLink = _previousLink;
            _previousLink = null;
            _nextLink = null;
            // Defect 240039
            //_parent = null;
            _state = PHYSICALLY_UNLINKED;
        }
    }
316354
async def stop(self):
        
        if self._association_state != self.State.CLOSED:
            await self._abort()
        self.__transport._unregister_data_receiver(self)
        self._set_state(self.State.CLOSED)
424133
def unlink(self, other):
        
        p = other.__pts__
        return self.properties.unlink(p)
859749
synchronized void unlink(final OtpErlangPid from, final OtpErlangPid to) {
        links.removeLink(from, to);
        try {
            super.sendUnlink(from, to);
        } catch (final IOException e) {
        }
    }
110185
def disconnect(self):
        """"""
        # TODO Close the APs. When this is attempted, we get an undocumented 0x1d error. Doesn't
        #      seem to be necessary, anyway.
        self._memory_interfaces = {}
        
        self._link.enter_idle()
        self._is_connected = False
1010886
public void detach() throws SIResourceException, SINotPossibleInCurrentConfigurationException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "detach");

    // Make sure we are not ready
    notReady();

    // Remove us from any group we are a member of
    if(keyGroup != null)
      keyGroup.removeMember(this);

    // Remove this consumer from the CD's knowledge
    consumerDispatcher.detachConsumerPoint(this);

    // Cleanly dispose of the getCursor
    if(classifyingMessages)
    {
      // Take the classifications read lock
      consumerSet.takeClassificationReadLock();
      
      int numFilters = consumerKeyFilter.length;
      for(int i=0;i<numFilters;i++)
        consumerKeyFilter[i].detach();
      
      // Free the classifications read lock
      consumerSet.freeClassificationReadLock();
    }
    else
      consumerKeyFilter[0].detach();

    synchronized (this)
    {
      detached = true;
    }
    
    // Remove the consumerPoint to the consumerSet if the latter has been specified
    if(classifyingMessages)
      consumerSet.removeConsumer(consumerPoint); 
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "detach");
  }
744396
private void sawMonitorExit(int pc) {
        if (!monitorSyncPCs.isEmpty()) {
            ScopeBlock sb = findSynchronizedScopeBlock(rootScopeBlock, monitorSyncPCs.get(0).intValue());
            if (sb != null) {
                sb.setFinish(pc);
            }
            monitorSyncPCs.remove(monitorSyncPCs.size() - 1);
        }
    }
445185
function unlink(mode, target, system, containerDef, container, out, cb) {
    logger.info('unlinking');
    out.stdout('unlinking');

    var elb = findParentELB(system, container);

    if (elb) {
      logger.info(elb, 'elb found');
      unlinkFromELB(mode, system, elb, container, out, cb);
    } else {
      logger.info('elb not found');
      cb(null, target);
    }
  }
1095731
public void close() {
    if (socketChannel == null) {
      return;
    }

    monitor.remove(socketChannel);
    try {
      socketChannel.close();
    } catch (IOException ignored) {
      /* nothing to be done */
    } finally {
      socketChannel = null;
    }
  }
323606
function unlinkFromCuratedDeviceEvents() {
        self.curatedDevice.removeListener(
            'DEVICE_DISCONNECTED',
            curatedDeviceDisconnected
        );
        self.curatedDevice.removeListener(
            'DEVICE_RECONNECTED',
            curatedDeviceReconnected
        );
        self.curatedDevice.removeListener(
            'DEVICE_ERROR',
            curatedDeviceError
        );
        self.curatedDevice.removeListener(
            'DEVICE_RECONNECTING',
            curatedDeviceReconnecting
        );
        self.curatedDevice.removeListener(
            'DEVICE_ATTRIBUTES_CHANGED',
            cureatedDeviceAttributesChanged
        );
    }
348183
def unbind(self):
        
        self.connected = False
        self.queue_manager.disconnect(self.connection)
        self.topic_manager.disconnect(self.connection)
1276883
public void unlink(Object source, CollectionDescriptor cds, Object referenceToUnlink)
    {
        if(cds.isMtoNRelation())
        {
            m_broker.deleteMtoNImplementor(new MtoNImplementor(cds, source, referenceToUnlink));
        }
        else
        {
            ClassDescriptor cld = m_broker.getClassDescriptor(referenceToUnlink.getClass());
            m_broker.unlinkFK(referenceToUnlink, cld, cds);
        }
    }
371989
def _detach(self, fcp, assigner_id, target_wwpn, target_lun,
                multipath, os_version, mount_point):
        """"""
        LOG.info('Start to detach device from %s' % assigner_id)
        connections = self.fcp_mgr.decrease_fcp_usage(fcp, assigner_id)

        try:
            self._remove_disk(fcp, assigner_id, target_wwpn, target_lun,
                              multipath, os_version, mount_point)
            if not connections:
                self._undedicate_fcp(fcp, assigner_id)
        except (exception.SDKBaseException,
                exception.SDKSMTRequestFailed) as err:
            errmsg = 'rollback detach because error:' + err.format_message()
            LOG.error(errmsg)
            self.fcp_mgr.increase_fcp_usage(fcp, assigner_id)
            with zvmutils.ignore_errors():
                self._add_disk(fcp, assigner_id, target_wwpn, target_lun,
                               multipath, os_version, mount_point)
            raise exception.SDKBaseException(msg=errmsg)

        LOG.info('Detaching device to %s is done.' % assigner_id)
467210
def UNREACH(self):
        
        if self._VALUES.get(PARAM_UNREACH, False):
            return True
        else:
            for device in self._hmchannels.values():
                if device.UNREACH:
                    return True
        return False
248429
void unregister(ResourceMonitorImpl monitorImpl)
   {
      Set<Entry<WatchKey, ResourceMonitorImpl>> entrySet = keys.entrySet();
      Iterator<Entry<WatchKey, ResourceMonitorImpl>> iterator = entrySet.iterator();
      while (iterator.hasNext())
      {
         Entry<WatchKey, ResourceMonitorImpl> next = iterator.next();
         if (next.getValue() == monitorImpl)
         {
            next.getKey().cancel();
            iterator.remove();
         }
      }
   }
1298410
public void removeEventListener() {

        logger.fine("RXTXPort:removeEventListener() called");
        waitForTheNativeCodeSilly();
        //if( monThread != null && monThread.isAlive() )
        if (monThreadisInterrupted == true) {
            logger.fine("	RXTXPort:removeEventListener() already interrupted");
            monThread = null;
            SPEventListener = null;
            return;
        } else if (monThread != null && monThread.isAlive()) {

            logger.fine("	RXTXPort:Interrupt=true");
            monThreadisInterrupted = true;
            /*
             Notify all threads in this PID that something is up
             They will call back to see if its their thread
             using isInterrupted().
             */

            logger.fine("	RXTXPort:calling interruptEventLoop");
            interruptEventLoop();

            logger.fine("	RXTXPort:calling monThread.join()");
            try {

                // wait a reasonable moment for the death of the monitor thread
                monThread.join(3000);
            } catch (InterruptedException ex) {
                // somebody called interrupt() on us (ie wants us to abort)
                // we dont propagate InterruptedExceptions so lets re-set the flag 
                Thread.currentThread().interrupt();
                return;
            }

            {
                logger.fine("	MonThread is still alive!");

            }

        }
        monThread = null;
        SPEventListener = null;
        MonitorThreadLock = false;
        MonitorThreadAlive = false;
        monThreadisInterrupted = true;
        logger.fine("RXTXPort:removeEventListener() returning");
    }
404762
def unlink(link):
    
    if islink(link) and platform.system() == "Windows" and sys.version_info[:2] < (3, 5):
        # deleting junction points was added to os.unlink in 3.5
        # https://bugs.python.org/issue18314
        subprocess.check_call(["rmdir", link], shell=True)
    else:
        os.unlink(link)