MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / enqueue

Method enqueue

deps/concurrentqueue/concurrentqueue.h:974–978  ·  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

972 // or Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed).
973 // Thread-safe.
974 inline bool enqueue(T const& item)
975 {
976 MOODYCAMEL_CONSTEXPR_IF (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0) return false;
977 else return inner_enqueue<CanAlloc>(item);
978 }
979
980 // Enqueues a single item (by moving it, if possible).
981 // Allocates memory if required. Only fails if memory allocation fails (or implicit

Callers

nothing calls this directly

Calls 1

MOODYCAMEL_CONSTEXPR_IFFunction · 0.85

Tested by

no test coverage detected