MCPcopy Create free account
hub / github.com/3rdparty/libprocess / Data

Class Data

include/process/queue.hpp:106–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104
105private:
106 struct Data
107 {
108 Data() = default;
109
110 ~Data()
111 {
112 // TODO(benh): Fail promises?
113 }
114
115 // Rather than use a process to serialize access to the queue's
116 // internal data we use a 'std::atomic_flag'.
117 std::atomic_flag lock = ATOMIC_FLAG_INIT;
118
119 // Represents "waiters" for elements from the queue.
120 std::deque<Owned<Promise<T>>> promises;
121
122 // Represents elements already put in the queue.
123 std::queue<T> elements;
124 };
125
126 std::shared_ptr<Data> data;
127};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected