X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/25640a21a7ea2b5283d7db306491d770ff87b81c..4fba9919f53926bdd39f8bdb9da4539b99d98e23:/docs/source/app_s4u.rst diff --git a/docs/source/app_s4u.rst b/docs/source/app_s4u.rst index 7f9b1ae1d5..22f85cb44b 100644 --- a/docs/source/app_s4u.rst +++ b/docs/source/app_s4u.rst @@ -598,7 +598,7 @@ Reacting to the end of actors .. doxygenfunction:: simgrid::s4u::Actor::join() const .. doxygenfunction:: simgrid::s4u::Actor::join(double timeout) const .. doxygenfunction:: simgrid::s4u::Actor::set_auto_restart(bool autorestart) - .. doxygenfunction:: simgrid::s4u::Actor::get_restart_count() + .. doxygenfunction:: simgrid::s4u::Actor::get_restart_count .. group-tab:: Python @@ -743,6 +743,7 @@ the execution, or start an asynchronous activity. .. doxygenfunction:: simgrid::s4u::this_actor::execute(double flop) .. doxygenfunction:: simgrid::s4u::this_actor::execute(double flop, double priority) .. doxygenfunction:: simgrid::s4u::this_actor::parallel_execute(const std::vector< s4u::Host * > &hosts, const std::vector< double > &flops_amounts, const std::vector< double > &bytes_amounts) + .. doxygenfunction:: simgrid::s4u::this_actor::thread_execute .. group-tab:: Python @@ -2414,8 +2415,8 @@ Life cycle .. doxygenfunction:: simgrid::s4u::Io::test .. doxygenfunction:: simgrid::s4u::Io::wait .. doxygenfunction:: simgrid::s4u::Io::wait_for - .. doxygenfunction:: simgrid::s4u::Io::wait_any - .. doxygenfunction:: simgrid::s4u::Io::wait_any_for + .. doxygenfunction:: simgrid::s4u::Io::wait_any(const std::vector &ios) + .. doxygenfunction:: simgrid::s4u::Io::wait_any_for(const std::vector &ios, double timeout) .. group-tab:: Python @@ -2478,6 +2479,12 @@ Basic management from simgrid import Mutex mutex = Mutex() + # Use a context manager to acquire and automatically release the mutex + # when leaving the scope. + with mutex: + # Access shared resource ... + pass + .. group-tab:: C .. code-block:: C @@ -2521,7 +2528,15 @@ Locking ⁣  Barrier ================ -.. doxygenclass:: simgrid::s4u::Barrier +.. tabs:: + + .. group-tab:: C++ + + .. doxygenclass:: simgrid::s4u::Barrier + + .. group-tab:: Python + + .. autoclass:: simgrid.Barrier .. tabs:: @@ -2533,10 +2548,18 @@ Locking .. doxygentypedef:: BarrierPtr - .. doxygenfunction:: simgrid::s4u::Barrier::Barrier(unsigned int expected_actors) .. doxygenfunction:: simgrid::s4u::Barrier::create(unsigned int expected_actors) .. doxygenfunction:: simgrid::s4u::Barrier::wait() + .. group-tab:: Python + + .. code-block:: Python + + from simgrid import Barrier + barrier = Barrier(2) + + .. automethod:: simgrid.Barrier.wait() + .. group-tab:: C .. code-block:: C