MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / remove

Method remove

benchmarks/tbb/observer_proxy.cpp:135–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135void observer_list::remove ( observer_proxy* p ) {
136 __TBB_ASSERT( my_head, "Attempt to remove an item from an empty list" );
137 __TBB_ASSERT( !my_tail->my_next, "Last item's my_next must be NULL" );
138 if( p == my_tail ) {
139 __TBB_ASSERT( !p->my_next, NULL );
140 my_tail = p->my_prev;
141 }
142 else {
143 __TBB_ASSERT( p->my_next, NULL );
144 p->my_next->my_prev = p->my_prev;
145 }
146 if ( p == my_head ) {
147 __TBB_ASSERT( !p->my_prev, NULL );
148 my_head = p->my_next;
149 }
150 else {
151 __TBB_ASSERT( p->my_prev, NULL );
152 p->my_prev->my_next = p->my_next;
153 }
154 __TBB_ASSERT( (my_head && my_tail) || (!my_head && !my_tail), NULL );
155}
156
157void observer_list::remove_ref( observer_proxy* p ) {
158 int r = p->my_ref_count;

Callers 12

removeMethod · 0.45
removeMethod · 0.45
thread_end_handlerMethod · 0.45
clearMethod · 0.45
stopMethod · 0.45
threadMethod · 0.45
stop_and_waitMethod · 0.45
remove_predecessorMethod · 0.45
observeMethod · 0.45
cancel_waitMethod · 0.45
notify_one_relaxedMethod · 0.45

Calls

no outgoing calls

Tested by 1

thread_end_handlerMethod · 0.36