MCPcopy Create free account
hub / github.com/actor-framework/actor-framework / with_retry

Function with_retry

robot/middleman/driver.cpp:184–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182
183template <class Fn>
184auto with_retry(Fn fn) {
185 auto total_delay = 0ms;
186 for (;;) {
187 if (auto res = fn())
188 return res;
189 total_delay += 50ms;
190 if (total_delay > 2s) {
191 std::cout << "failed to connect" << std::endl;
192 abort();
193 }
194 std::this_thread::sleep_for(50ms);
195 }
196}
197
198std::optional<int32_t> read_cell_value(scoped_actor& self, const actor& cell) {
199 std::optional<int32_t> result;

Callers 1

clientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected