Name
Thread
Synopsis
class Thread(name=None,target=None,args=( ),kwargs={ })
Always call Thread with named arguments: the
number and order of formal arguments may change in the future, but
the names of existing arguments are guaranteed to stay. When you
instantiate class Thread itself, you should
specify target:
t
.run calls
target
(*
args
,**
kwargs
).
When you subclass Thread and override
run, you normally don’t specify
target. In either case, execution
doesn’t begin until you call
t
.start( ).
name is
t’s name. If
name is None,
Thread generates a unique name for
t. If a subclass T of
Thread overrides __init__,
T.__init__ must call Thread.__init__ on self before any other
Thread method.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access