| 193 | } |
| 194 | |
| 195 | caf::actor py_context::py_remote_spawn(const py::args &xs) { |
| 196 | if (xs.size() < 1) { |
| 197 | set_py_exception("Too few arguments to call py_remote_spawn"); |
| 198 | return {}; |
| 199 | } |
| 200 | auto i = xs.begin(); |
| 201 | auto name = (*i).cast<std::string>(); |
| 202 | auto msg = py_build_message(xs); |
| 203 | auto remote = system_.middleman().remote_spawn<caf::actor>( |
| 204 | remote_.node(), name, *msg, std::chrono::seconds(30)); |
| 205 | if (remote) |
| 206 | return *remote; |
| 207 | set_py_exception("Failed to spawn remote actor."); |
| 208 | return {}; |
| 209 | } |
| 210 | |
| 211 | // void py_context::py_join(const py::args &xs) { |
| 212 | // if (xs.size() < 1) { |
nothing calls this directly
no test coverage detected