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

Method insert

benchmarks/tbb/observer_proxy.cpp:124–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124void observer_list::insert ( observer_proxy* p ) {
125 scoped_lock lock(mutex(), /*is_writer=*/true);
126 if ( my_head ) {
127 p->my_prev = my_tail;
128 my_tail->my_next = p;
129 }
130 else
131 my_head = p;
132 my_tail = p;
133}
134
135void observer_list::remove ( observer_proxy* p ) {
136 __TBB_ASSERT( my_head, "Attempt to remove an item from an empty list" );

Callers 7

mainFunction · 0.45
retrieve_serialMethod · 0.45
observeMethod · 0.45

Calls 1

mutexClass · 0.70

Tested by

no test coverage detected