MCPcopy Create free account
hub / github.com/dmlc/dmlc-core / add

Method add

include/dmlc/concurrentqueue.h:1388–1399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1386 FreeList &operator=(FreeList const &) MOODYCAMEL_DELETE_FUNCTION;
1387
1388 inline void add(N *node) {
1389#if MCDBGQ_NOLOCKFREE_FREELIST
1390 debug::DebugLock lock(mutex);
1391#endif
1392 // We know that the should-be-on-freelist bit is 0 at this point, so it's safe to
1393 // set it using a fetch_add
1394 if (node->freeListRefs.fetch_add(SHOULD_BE_ON_FREELIST, std::memory_order_acq_rel) == 0) {
1395 // Oh look! We were the last ones referencing this node, and we know
1396 // we want to add it to the free list, so let's do it!
1397 add_knowing_refcount_is_zero(node);
1398 }
1399 }
1400
1401 inline N *try_get() {
1402#if MCDBGQ_NOLOCKFREE_FREELIST

Callers 10

runMethod · 0.80
submitTasksMethod · 0.80
onContainersAllocatedMethod · 0.80
abortJobMethod · 0.80
handleFailureMethod · 0.80
onContainersCompletedMethod · 0.80
get_cache_file_setFunction · 0.80
assign_rankMethod · 0.80
yarn_submitFunction · 0.80
add_block_to_free_listFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected