Worker¶
- class farn.run.utils.threading.Worker(job_queue: JobQueue)¶
Bases:
ThreadWorker thread executing jobs from a job queue.
- __init__(job_queue: JobQueue) None¶
Instantiate a Worker and bind it to the passed in JobQueue instance.
- Parameters:
job_queue (JobQueue) – the JobQueue this Worker shall be bound to
Methods
__init__(job_queue)Instantiate a Worker and bind it to the passed in JobQueue instance.
getName()Return a string used for identification purposes only.
isDaemon()Return whether this thread is a daemon.
is_alive()Return whether the thread is alive.
join([timeout])Wait until the thread terminates.
run()Run the next job from the JobQueue this Worker is bound to.
setDaemon(daemonic)Set whether this thread is a daemon.
setName(name)Set the name string for this thread.
start()Start the thread's activity.
Attributes
daemonA 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.
- run() None¶
Run the next job from the JobQueue this Worker is bound to.