class documentation

class SimpleAsyncOperation(NotebookOperation): (source)

View In Hierarchy

Variant of NotebookOperation that monitors a thread. Key difference is that instead of raising an exception when another operation tries to start it will wait for the thread. So only useful for short run time threads, like async file write.
Method __call__ This method is called when another operation tries to start while we are running. When called either finish quickly or raise NotebookOperationOngoing.
Method __init__ No summary
Method cancel Undocumented
Method wait Undocumented
Instance Variable _thread Undocumented

Inherited from NotebookOperation:

Method __iter__ Undocumented
Method is_running Undocumented
Method run_on_idle Start the operation by setting up the main loop event handler.
Class Variable __signals__ Undocumented
Instance Variable cancelled Undocumented
Instance Variable exception Undocumented
Instance Variable finished Undocumented
Instance Variable message Undocumented
Instance Variable notebook Undocumented
Method _start Undocumented
Instance Variable _block Undocumented
Instance Variable _do_work Undocumented

Inherited from SignalEmitter (via NotebookOperation):

Method __new__ Undocumented
Method block_signals Returns a context manager for blocking one or more signals
Method connect Register a handler for a specific object.
Method connect_after Like connect() but handler will be called after default handler
Method disconnect Undocumented
Method emit Undocumented
Method emit_return_first Emits a signal and stops emission on the first handler that returns a not-None value.
Method emit_return_iter Returns an generator that calls one handler on each iteration and yields the return values. This allows aggregating return values.
Method _connect Undocumented
Method _setup_signal Undocumented
Method _teardown_signal Undocumented
def __call__(self): (source)
This method is called when another operation tries to start while we are running. When called either finish quickly or raise NotebookOperationOngoing.
def __init__(self, notebook, message, thread, post_handler=None): (source)
Constructor
Parameters
notebookthe Notebook object
messagea message string for the heading of progress dialogs
threada {threading.Thread} object
post_handleroptional function to call in main after the thread has finished
def cancel(self): (source)
_thread = (source)

Undocumented