miniworld.concurrency package

Submodules

miniworld.concurrency.ExceptionStopThread module

miniworld.concurrency.StopThread module

class miniworld.concurrency.StopThread.StopThread(*args, **kwargs)[source]

Bases: threading.Thread

Extends the Thread with an Event and the terminate method like the multiprocessing api offers it.

Calling it will trigger the Event. Just implement your cleanup code for this event.

shall_terminate()[source]

Can be queried to know if the Thread shall do some cleanup

terminate()[source]

Immitate the processing API and offer a way to do some clean up in the Thread.

Module contents