[3.11] gh-101100: Fix sphinx warnings in `threading.rst` (GH-108684) by miss-islington · Pull Request #108708 · python/cpython
For more details and extensive examples, see the documentation string of the :mod:`_threading_local` module: :source:`Lib/_threading_local.py`. :mod:`!_threading_local` module: :source:`Lib/_threading_local.py`.
.. _thread-objects:
Once a thread object is created, its activity must be started by calling the thread's :meth:`~Thread.start` method. This invokes the :meth:`~Thread.run`
*group* should be ``None``; reserved for future extension when a :class:`ThreadGroup` class is implemented. :class:`!ThreadGroup` class is implemented.
*target* is the callable object to be invoked by the :meth:`run` method. Defaults to ``None``, meaning nothing is called.
Timers are started, as with threads, by calling their :meth:`~Timer.start` Timers are started, as with threads, by calling their :meth:`Timer.start <Thread.start>` method. The timer can be stopped (before its action has begun) by calling the :meth:`~Timer.cancel` method. The interval the timer will wait before executing its action may not be exactly the same as the interval specified by
All of the objects provided by this module that have :meth:`acquire` and :meth:`release` methods can be used as context managers for a :keyword:`with` statement. The :meth:`acquire` method will be called when the block is entered, and :meth:`release` will be called when the block is exited. Hence, All of the objects provided by this module that have ``acquire`` and ``release`` methods can be used as context managers for a :keyword:`with` statement. The ``acquire`` method will be called when the block is entered, and ``release`` will be called when the block is exited. Hence, the following snippet::
with some_lock: