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

Method note_done

benchmarks/tbb/pipeline.cpp:178–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176 // of the current token in the buffer keeps another stage from being spawned.
177 template<typename StageTask>
178 void note_done( Token token, StageTask& spawner ) {
179 task_info wakee;
180 wakee.reset();
181 {
182 spin_mutex::scoped_lock lock( array_mutex );
183 if( !is_ordered || token==low_token ) {
184 // Wake the next task
185 task_info& item = array[++low_token & (array_size-1)];
186 ITT_NOTIFY( sync_acquired, this );
187 wakee = item;
188 item.is_valid = false;
189 }
190 }
191 if( wakee.is_valid )
192 spawner.spawn_stage_task(wakee);
193 }
194
195#if __TBB_TASK_GROUP_CONTEXT
196 //! The method destroys all data in filters to prevent memory leaks

Callers 1

executeMethod · 0.80

Calls 2

spawn_stage_taskMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected