]> git.saurik.com Git - wxWidgets.git/blame - wxPython/samples/wxPIA_book/Chapter-05/abstractmodel.py
fixed deadlock when calling wxPostEvent() from worker thread
[wxWidgets.git] / wxPython / samples / wxPIA_book / Chapter-05 / abstractmodel.py
CommitLineData
be05b434
RD
1class AbstractModel(object):
2
3 def __init__(self):
4 self.listeners = []
5
6 def addListener(self, listenerFunc):
7 self.listeners.append(listenerFunc)
8
9 def removeListener(self, listenerFunc):
10 self.listeners.remove(listenerFunc)
11
12 def update(self):
13 for eachFunc in self.listeners:
14 eachFunc(self)
15