.. _f-parallelthread: module ``td_2a.parallel_thread`` ================================ .. inheritance-diagram:: ensae_teaching_cs.td_2a.parallel_thread Short summary +++++++++++++ module ``ensae_teaching_cs.td_2a.parallel_thread`` Ce fichier contient un exemple qui permet d'exécuter plusieurs threads. :githublink:`%|py|5` Classes +++++++ +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ | class | truncated documentation | +==================================================================================+=========================================================================================================+ | :class:`ParallelThread ` | Cette classe implémente un thread qui exécute en boucle une fonction sur tous les éléments d'une liste. | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ Properties ++++++++++ +--------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | property | truncated documentation | +======================================================================================+=============================================================================================================================+ | :meth:`daemon ` | A boolean value indicating whether this thread is a daemon thread. This must be set before start() is called, otherwise ... | +--------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :meth:`ident ` | Thread identifier of this thread or None if it has not been started. This is a nonzero integer. See the get_ident() ... | +--------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :meth:`name ` | A string used for identification purposes only. It has no semantics. Multiple threads may be given the same name. ... | +--------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :meth:`native_id ` | Native integral thread ID of this thread, or None if it has not been started. This is a non-negative integer. ... | +--------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ Static Methods ++++++++++++++ +------------------------------------------------------------------------------------+----------------------------------------------------------------------+ | staticmethod | truncated documentation | +====================================================================================+======================================================================+ | :meth:`parallel ` | Parallélise l'appel à la fonction ``f`` sur une liste de paramètres. | +------------------------------------------------------------------------------------+----------------------------------------------------------------------+ Methods +++++++ +---------------------------------------------------------------------------------------+------------------------------------------------------------------------+ | method | truncated documentation | +=======================================================================================+========================================================================+ | :py:meth:`__init__ ` | Constructeur | +---------------------------------------------------------------------------------------+------------------------------------------------------------------------+ | :meth:`run ` | Appelle une fonction plusieurs sur tous les paramètres dans une liste. | +---------------------------------------------------------------------------------------+------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: ensae_teaching_cs.td_2a.parallel_thread :members: :special-members: __init__ :show-inheritance: