MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / changeOwner

Method changeOwner

dds/InfoRepo/DCPS_IR_Participant.cpp:103–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void
104DCPS_IR_Participant::changeOwner(long sender, long owner)
105{
106 {
107 ACE_GUARD(ACE_SYNCH_MUTEX, guard, this->ownerLock_);
108
109 if ((owner == OWNER_NONE)
110 && (this->isOwner() || (this->owner_ != sender))) {
111 // Do not eliminate ownership if we are the owner or if the update
112 // does not come from the current owner.
113 return;
114 }
115
116 // Finally. Change the value.
117 this->owner_ = owner;
118
119 } // End of lock scope.
120
121 if (this->isOwner()) {
122 /// @TODO: Ensure that any stalled callbacks are made.
123 }
124}
125
126long
127DCPS_IR_Participant::owner() const

Callers 2

takeOwnershipMethod · 0.95
changeOwnershipMethod · 0.80

Calls 1

isOwnerMethod · 0.95

Tested by

no test coverage detected