Baseclass for threads in BALL. To use multithreading in BALL, there are several problems arising from the fact, that Qt itself is not threadsafe:
- Prevent any output to Log, stdout or sterr. If a simulation has to print some informations, use the method output_, which will send an Event to the GUI-thread.
- Dont call any Qt-methods directly. If you need some interaction with the GUI, send a QEvent to the MainControl.
- Especially dont call the refresh methods for the Scene or GL-methods. Use updateStructure_() instead.
- Overload the run method to insert the multithreaded code.
- Call setMainControl() before running the thread
- Before running a thread, lock the composites with ModularWidget::lockComposites().
- After running a thread, unlock them with ModularWidget::unlockComposites(). If you dont pay attention to these rules, dont wonder if BALLView should freeze or crash!
Definition at line 69 of file threads.h.