- m.def("create_actor", create_actor, "Create an actor");
- m.def("create_actor", [](std::string name, Host* host) -> std::function<ActorPtr(std::function<void()>)> {
- return [name, host](std::function<void()> f) -> ActorPtr {
- return simgrid::s4u::Actor::create(name, host, std::move(f));
- };
- }, "Create an actor");
+ py::class_<simgrid::s4u::Actor, ActorPtr>(m, "Actor", ""
+ "An actor is an independent stream of execution in your distributed application, see :ref:`class s4u::Actor <API_s4u_Actor>`")
+ .def("create", create_actor, "Create an actor from a function, see :cpp:func:`simgrid::s4u::Actor::create()`")
+ .def("create", [](std::string name, Host* host) -> std::function<ActorPtr(std::function<void()>)> {
+ return [name, host](std::function<void()> f) -> ActorPtr {
+ return simgrid::s4u::Actor::create(name, host, std::move(f));
+ };
+ }, "Create an actor from a functor");
+
+