Inherits threading::Thread.
Inherited by objects.gui.threads.mouseHoverThread.mouseHoverThread, objects.gui.threads.redrawThread.redrawThread, objects.logic.network.pcapyImplementation.pcapyWorkerThread, objects.storage.storageManager.storageMonitorThread, and objects.storage.storageManager.storageWriterThread.
Public Member Functions | |
| def | __init__ |
| Constructor method. | |
| def | reset |
| Resets the members to their original state. | |
| def | killSignal |
| Sets the killSwitch flag to True. | |
| def | getKillSignal |
| returns the value of the killSwitch flag | |
| def | wait |
| Waits for threadEvent event to be set. | |
| def | killSignalAndWait |
| Just calls killSignal() and wiat(). | |
Public Attributes | |
| parent | |
| threadEvent | |
| killSwitch | |
This class is basically a representation of a thread, which can be started, stopped and restarted on command. appThreadBase derived objects are typically alive for the duration of most of the application.
Definition at line 23 of file appThreadBase.py.
| def objects.logic.common.threads.appThreadBase.appThreadBase.__init__ | ( | self, | ||
| _parent | ||||
| ) |
Constructor method.
| _parent | pointer. It could be anything, but usually whatever object starts the thread |
Definition at line 27 of file appThreadBase.py.
00027 : 00028 Thread.__init__(self) 00029 self.parent = _parent 00030 00031 self.threadEvent = Event() 00032 self.threadEvent.set() 00033 00034 self.killSwitch = False; 00035 ## Resets the members to their original state
| def objects.logic.common.threads.appThreadBase.appThreadBase.getKillSignal | ( | self | ) |
returns the value of the killSwitch flag
Definition at line 48 of file appThreadBase.py.
00048 : 00049 return self.killSwitch; 00050 00051 ## Waits for threadEvent event to be set.
| def objects.logic.common.threads.appThreadBase.appThreadBase.killSignal | ( | self | ) |
Sets the killSwitch flag to True.
The KillSwitch is just the flag which causes the while() loop in the run method to end.
Definition at line 43 of file appThreadBase.py.
00043 : 00044 self.killSwitch = True; 00045 ## returns the value of the killSwitch flag
| def objects.logic.common.threads.appThreadBase.appThreadBase.killSignalAndWait | ( | self, | ||
| timeSecs | ||||
| ) |
Just calls killSignal() and wiat().
| timeSecs | Number of seconds to wait. |
Definition at line 60 of file appThreadBase.py.
00060 : 00061 self.killSignal() 00062 self.wait(timeSecs) 00063 00064
| def objects.logic.common.threads.appThreadBase.appThreadBase.reset | ( | self | ) |
Resets the members to their original state.
Definition at line 37 of file appThreadBase.py.
00037 : 00038 self.threadEvent.set() 00039 self.killSwitch = False; 00040 ## Sets the killSwitch flag to True. The KillSwitch is just the flag which causes the while() loop
| def objects.logic.common.threads.appThreadBase.appThreadBase.wait | ( | self, | ||
| timeSecs | ||||
| ) |
Waits for threadEvent event to be set.
| timeSecs | Number of seconds to wait. |
Definition at line 54 of file appThreadBase.py.
00054 : 00055 self.threadEvent.wait(timeSecs) 00056 00057 ## Just calls killSignal() and wiat()
Reimplemented in objects.gui.threads.mouseHoverThread.mouseHoverThread, objects.gui.threads.redrawThread.redrawThread, objects.logic.network.pcapyImplementation.pcapyWorkerThread, objects.storage.storageManager.storageWriterThread, and objects.storage.storageManager.storageMonitorThread.
Definition at line 34 of file appThreadBase.py.
Definition at line 29 of file appThreadBase.py.
Definition at line 31 of file appThreadBase.py.
1.5.8