| 178 | } |
| 179 | |
| 180 | caf::actor py_context::py_spawn(const py::args &xs) { |
| 181 | if (xs.size() < 1) { |
| 182 | set_py_exception("Too few arguments to call py_spawn"); |
| 183 | return {}; |
| 184 | } |
| 185 | auto i = xs.begin(); |
| 186 | auto name = (*i).cast<std::string>(); |
| 187 | auto msg = py_build_message(xs); |
| 188 | auto remote = system_.spawn<caf::actor>(name, *msg); |
| 189 | if (remote) |
| 190 | return *remote; |
| 191 | set_py_exception("Failed to spawn actor."); |
| 192 | return {}; |
| 193 | } |
| 194 | |
| 195 | caf::actor py_context::py_remote_spawn(const py::args &xs) { |
| 196 | if (xs.size() < 1) { |
nothing calls this directly
no test coverage detected