camelot.camelot.view.model_thread

Package camelot :: Package camelot :: Package view :: Module model_thread |
[hide private]
[frames] | no frames]

# Module model_thread

source code

Classes | [hide private]
| ModelThreadException
| ModelThread Thread in which the model runs, all requests to the model should be posted to the the model thread.

Functions | [hide private]
model_function(original_function) Decorator to ensure a function is only called from within the model thread. | source code
gui_function(original_function) Decorator to ensure a function is only called from within the gui thread. | source code
construct_model_thread(*args, **kwargs) | source code
get_model_thread() | source code

Variables | [hide private]
| logger = `logging.getLogger('camelot.view.model_thread')`
| _model_thread_ = `[]`

Function Details | [hide private]

### model_function(original_function) | source code
Decorator to ensure a function is only called from within the model thread. If this function is called in another thread, an exception will be thrown

### gui_function(original_function) | source code
Decorator to ensure a function is only called from within the gui thread. If this function is called in another thread, an exception will be thrown To Do: now it only checks if the function is not called within the model thread, this is incomplete