WorkerThread Class

Inheritance diagram of WorkerThread

class WorkerThread(target=None)

Constructor:

__init__(target=None)

Methods:

clear_jobs()
get_job()
notify() Interrupt the current sleep operation.
put_job(job)
run()
sleep(timeout) Wait for some amount of time, or until notified.
start()
stop() Stop the thread and wait for it to terminate.

Methods

WorkerThread.clear_jobs()
WorkerThread.get_job()
WorkerThread.put_job(job)
WorkerThread.run()

Inherited members

Methods

WorkerThread.notify()

Interrupt the current sleep operation.

If the thread is currently sleeping, it will be woken immediately, instead of waiting the full duration of the timeout.

WorkerThread.sleep(timeout)

Wait for some amount of time, or until notified.

Parameters:timeout (float) – Time to wait, in seconds.
WorkerThread.start()
WorkerThread.stop()

Stop the thread and wait for it to terminate.

The stop instance variable is set to True and the condition is notified. It is the responsibility of the run method to check the value of stop after each sleep or wait and to return if set.

Table Of Contents

Previous topic

VideoFormat Class

Next topic

CannotSeekException