ID EN
Threading

Thread

Python 3.11

This constructor should always be called with keyword arguments. Arguments are:

Syntax

PYTHON
class threading.Thread(group=None, target=None, name=None, args=(), kwargs={}, *, daemon=None)

Examples

Example 1
PYTHON
>>> from threading import Thread
>>> t = Thread(target=print, args=[1])
>>> t.run()
1
>>> t = Thread(target=print, args=(1,))
>>> t.run()
1

See Also

run() run() RuntimeError run() Thread join() join() is_alive()