Exemple #1
0
        internal virtual ReturnCode DetachFromWaitSet(WaitSet waitset)
        {
            ReturnCode result = DDS.ReturnCode.AlreadyDeleted;

            lock (this)
            {
                if (this.rlReq_isAlive)
                {
                    if (waitSetList.Remove(waitset))
                    {
                        result = waitset.wlReq_DetachGeneralCondition(this, rlReq_UserPeer);
                    }
                    else
                    {
                        /* Unable to take the given waitset is not a problem when de-initializing. */
                        if (!deinitializing)
                        {
                            result = DDS.ReturnCode.PreconditionNotMet;
                        }
                    }
                }
            }

            return(result);
        }
Exemple #2
0
        internal virtual ReturnCode DetachFromWaitSet(WaitSet waitset)
        {
            ReturnCode result = DDS.ReturnCode.AlreadyDeleted;

            lock (this)
            {
                if (this.rlReq_isAlive)
                {
                    if (waitSetList.Remove(waitset))
                    {
                        result = waitset.wlReq_DetachGeneralCondition(this, rlReq_UserPeer);
                    }
                    else
                    {
                        /* Unable to take the given waitset is not a problem when de-initializing. */
                        if (!deinitializing)
                        {
                            result = DDS.ReturnCode.PreconditionNotMet;
                        }
                    }
                }
            }

//            if (result != DDS.ReturnCode.Ok) {
//                OS_REPORT(OS_ERROR,
//                            "Condition::detach_waitset", 0,
//                            "detach failed with %s",
//                            DDS::OpenSplice::Utils::returnCodeToString(result));
//            }

            return(result);
        }