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

Method enqueue

include/dmlc/blockingconcurrentqueue.h:525–532  ·  view source on GitHub ↗

Enqueues a single item (by copying it). Allocates memory if required. Only fails if memory allocation fails (or implicit production is disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE is 0, or Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed). Thread-safe.

Source from the content-addressed store, hash-verified

523 // or Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed).
524 // Thread-safe.
525 inline bool enqueue(T const& item)
526 {
527 if (details::likely(inner.enqueue(item))) {
528 sema->signal();
529 return true;
530 }
531 return false;
532 }
533
534 // Enqueues a single item (by moving it, if possible).
535 // Allocates memory if required. Only fails if memory allocation fails (or implicit

Callers

nothing calls this directly

Calls 2

likelyFunction · 0.85
signalMethod · 0.45

Tested by

no test coverage detected