MCPcopy Create free account
hub / github.com/ml-explore/mlx / send_impl

Method send_impl

mlx/distributed/ring/ring.cpp:164–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162 };
163
164 std::future<void> send_impl(const char* buffer, size_t size) {
165 std::promise<void> send_completed_promise;
166 auto send_completed_future = send_completed_promise.get_future();
167 if (size == 0) {
168 send_completed_promise.set_value();
169 return send_completed_future;
170 }
171
172 {
173 std::unique_lock lock(queue_mutex_);
174 sends_.emplace_back(SocketTask(
175 const_cast<char*>(buffer), size, std::move(send_completed_promise)));
176 }
177 condition_.notify_one();
178 return send_completed_future;
179 }
180
181 std::future<void> recv_impl(char* buffer, size_t size) {
182 std::promise<void> recv_completed_promise;

Callers

nothing calls this directly

Calls 3

SocketTaskClass · 0.85
set_valueMethod · 0.80
emplace_backMethod · 0.80

Tested by

no test coverage detected