Contains information for one process.
Implements part of the Thread interface.
Methods:
start Start this task. Should be called once.
run Called by start to really run the task.
getName Get the name of the task.
setName Set the name of the task.
isAlive Whether this Task is still running.
Members:
retval Return value of the function.
Methods
|
|
__del__
__init__
getName
isAlive
run
setName
start
|
|
__del__
|
__del__ ( self )
|
|
__init__
|
__init__ (
self,
group=None,
target=None,
name=None,
args=(),
kwargs={},
)
Task([group][, target][, name][, args][, kwargs])
Create a task object. group should be None and is reserved
for future expansion. target is the function to be called.
name is the name of the thread. args and kwargs are the
arguments to be passed to target.
|
|
getName
|
getName ( self )
getName() -> name
|
|
isAlive
|
isAlive ( self )
isAlive() -> boolean
|
|
run
|
run ( self )
run() Run this task. Should only be called by S.start().
|
|
setName
|
setName ( self, name )
setName(name)
|
|
start
|
start ( self )
start() Start this task. Should only be called once.
Exceptions
|
|
ValueError, "task %s already started" % self._name
|
|
|