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

Method try_enqueue

include/dmlc/blockingconcurrentqueue.h:611–618  ·  view source on GitHub ↗

Enqueues a single item (by copying it). Does not allocate memory. Fails if not enough room to enqueue (or implicit production is disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE is 0). Thread-safe.

Source from the content-addressed store, hash-verified

609 // is 0).
610 // Thread-safe.
611 inline bool try_enqueue(T const& item)
612 {
613 if (inner.try_enqueue(item)) {
614 sema->signal();
615 return true;
616 }
617 return false;
618 }
619
620 // Enqueues a single item (by moving it, if possible).
621 // Does not allocate memory (except for one-time implicit producer).

Callers

nothing calls this directly

Calls 1

signalMethod · 0.45

Tested by

no test coverage detected