earthkit.data.core.thread

Classes

Future

SoftThread

A class that represents a thread of control.

SoftThreadPool

Module Contents

class earthkit.data.core.thread.Future(func, args, kwargs)
args
execute()
func
kwargs
result()
class earthkit.data.core.thread.SoftThread(queue, condition)

Bases: threading.Thread

A class that represents a thread of control.

This class can be safely subclassed in a limited fashion. There are two ways to specify the activity: by passing a callable object to the constructor, or by overriding the run() method in a subclass.

run()

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.

class earthkit.data.core.thread.SoftThreadPool(nthreads=4)
shutdown(error=None)
start()
submit(func, *args, **kwargs)