8.2.7.33. ServerThread¶
- class ServerThread(application, threaded=True, **kwargs)[source]¶
Methods
__delattr__Implement delattr(self, name).
__dir__Default dir() implementation.
__eq__Return self==value.
__format__Default object formatter.
__ge__Return self>=value.
__getattribute__Return getattr(self, name).
__getstate__Helper for pickle.
__gt__Return self>value.
__hash__Return hash(self).
This constructor should always be called with keyword arguments.
__init_subclass__This method is called when a class is subclassed.
__le__Return self<=value.
__lt__Return self<value.
__ne__Return self!=value.
__new____reduce__Helper for pickle.
__reduce_ex__Helper for pickle.
__repr__Return repr(self).
__setattr__Implement setattr(self, name, value).
__sizeof__Size of object in memory, in bytes.
__str__Return str(self).
__subclasshook__Abstract classes can override this to customize issubclass().
_bootstrap_bootstrap_inner_deleteRemove current thread from the dict of currently running threads.
_reset_internal_locks_set_ident_set_native_id_set_tstate_lockSet a lock object which will be released by the interpreter when the underlying thread state (see pystate.h) gets deleted.
_stop_wait_for_tstate_lockgetNameReturn a string used for identification purposes only.
isDaemonReturn whether this thread is a daemon.
is_aliveReturn whether the thread is alive.
joinWait until the thread terminates.
Method representing the thread's activity.
setDaemonSet whether this thread is a daemon.
setNameSet the name string for this thread.
startStart the thread's activity.
- __init__(application, threaded=True, **kwargs)[source]¶
This constructor should always be called with keyword arguments. Arguments are:
group should be None; reserved for future extension when a ThreadGroup class is implemented.
target is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called.
name is the thread name. By default, a unique name is constructed of the form “Thread-N” where N is a small decimal number.
args is a list or tuple of arguments for the target invocation. Defaults to ().
kwargs is a dictionary of keyword arguments for the target invocation. Defaults to {}.
If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread.
Attributes
__dict____weakref__list of weak references to the object
_initializeddaemonA boolean value indicating whether this thread is a daemon thread.
identThread identifier of this thread or None if it has not been started.
nameA string used for identification purposes only.
native_idNative integral thread ID of this thread, or None if it has not been started.
- __init__(application, threaded=True, **kwargs)[source]¶
This constructor should always be called with keyword arguments. Arguments are:
group should be None; reserved for future extension when a ThreadGroup class is implemented.
target is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called.
name is the thread name. By default, a unique name is constructed of the form “Thread-N” where N is a small decimal number.
args is a list or tuple of arguments for the target invocation. Defaults to ().
kwargs is a dictionary of keyword arguments for the target invocation. Defaults to {}.
If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread.
- run()[source]¶
Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
- __annotations__ = {}¶
- __doc__ = None¶
- __module__ = 'schedula.utils.drw'¶