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

Method try_enqueue

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

1037 // is 0).
1038 // Thread-safe.
1039 inline bool try_enqueue(T const& item)
1040 {
1041 MOODYCAMEL_CONSTEXPR_IF (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0) return false;
1042 else return inner_enqueue<CannotAlloc>(item);
1043 }
1044
1045 // Enqueues a single item (by moving it, if possible).
1046 // Does not allocate memory (except for one-time implicit producer).

Callers

nothing calls this directly

Calls 1

MOODYCAMEL_CONSTEXPR_IFFunction · 0.85

Tested by

no test coverage detected