MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/xstudio / py_spawn

Method py_spawn

src/python_module/src/py_context.cpp:180–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180caf::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
195caf::actor py_context::py_remote_spawn(const py::args &xs) {
196 if (xs.size() < 1) {

Callers

nothing calls this directly

Calls 3

set_py_exceptionFunction · 0.85
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected