MCPcopy Create free account
hub / github.com/deepseek-ai/3FS / try_enqueue

Method try_enqueue

src/common/utils/BoundedQueue.h:64–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62
63 template <typename U = T>
64 bool try_enqueue(U &&item) {
65 auto waitSuccess = enqueueSemaphore_.try_wait();
66 if (!waitSuccess) {
67 return false;
68 }
69 queue_.writeIfNotFull(std::forward<U>(item));
70 dequeueSemaphore_.signal();
71 return true;
72 }
73
74 std::optional<T> try_dequeue() {
75 T item;

Callers 4

tryEnqueueMethod · 0.80
ioRingWorkerMethod · 0.80
restoreMethod · 0.80
TESTFunction · 0.80

Calls 2

try_waitMethod · 0.45
signalMethod · 0.45

Tested by 1

TESTFunction · 0.64