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

Function cell_tests

robot/middleman/driver.cpp:209–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209int cell_tests(actor_system& sys, const actor& cell) {
210 scoped_actor self{sys};
211 self->monitor(cell);
212 if (auto res = read_cell_value(self, cell)) {
213 std::cout << "cell value 1: " << *res << std::endl;
214 self->mail(put_atom_v, *res + 7).send(cell);
215 } else {
216 return EXIT_FAILURE;
217 }
218 if (auto res = read_cell_value(self, cell)) {
219 std::cout << "cell value 2: " << *res << std::endl;
220 } else {
221 return EXIT_FAILURE;
222 }
223 self->send_exit(cell, exit_reason::user_shutdown);
224 self->receive([&](const down_msg&) { std::cout << "cell down\n"; },
225 after(5s) >> [&] { std::cout << "timeout\n"; });
226 return EXIT_SUCCESS;
227}
228
229void purge_cache(actor_system& sys, const std::string& host, uint16_t port) {
230 auto mm_hdl = actor_cast<actor>(sys.middleman().actor_handle());

Callers 1

clientFunction · 0.85

Calls 7

read_cell_valueFunction · 0.85
afterFunction · 0.85
monitorMethod · 0.45
sendMethod · 0.45
mailMethod · 0.45
send_exitMethod · 0.45
receiveMethod · 0.45

Tested by

no test coverage detected