eventdispatch 0.1.15__py3-none-any.whl → 0.1.17__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- eventdispatch/example1.py +12 -2
- {eventdispatch-0.1.15.dist-info → eventdispatch-0.1.17.dist-info}/METADATA +1 -1
- eventdispatch-0.1.17.dist-info/RECORD +10 -0
- eventdispatch-0.1.15.dist-info/RECORD +0 -10
- {eventdispatch-0.1.15.dist-info → eventdispatch-0.1.17.dist-info}/LICENSE +0 -0
- {eventdispatch-0.1.15.dist-info → eventdispatch-0.1.17.dist-info}/WHEEL +0 -0
- {eventdispatch-0.1.15.dist-info → eventdispatch-0.1.17.dist-info}/entry_points.txt +0 -0
- {eventdispatch-0.1.15.dist-info → eventdispatch-0.1.17.dist-info}/top_level.txt +0 -0
eventdispatch/example1.py
CHANGED
@@ -196,7 +196,12 @@ class KeyboardThread(threading.Thread):
|
|
196
196
|
blackboard[ed1.cv_name].notify(1)
|
197
197
|
blackboard[ed1.cv_name].release()
|
198
198
|
|
199
|
-
|
199
|
+
release = False
|
200
|
+
with ed1.dispatch_switch_mutex:
|
201
|
+
if not ed1.dispatch_switch:
|
202
|
+
release = True
|
203
|
+
|
204
|
+
return release
|
200
205
|
|
201
206
|
return False
|
202
207
|
|
@@ -205,7 +210,6 @@ class KeyboardThread(threading.Thread):
|
|
205
210
|
|
206
211
|
while local_hb:
|
207
212
|
self.blackboard["input_sem"].acquire()
|
208
|
-
print("unblocked!!!!!!!!!")
|
209
213
|
|
210
214
|
if not self.blackboard["ask"]:
|
211
215
|
print("no longer asking, break")
|
@@ -221,6 +225,12 @@ class KeyboardThread(threading.Thread):
|
|
221
225
|
local_hb = self.mutable_hb['hb']
|
222
226
|
|
223
227
|
def main():
|
228
|
+
print("###################")
|
229
|
+
print("This program exercises some EventDispatch best practices and patterns")
|
230
|
+
print("Type a number to command the system")
|
231
|
+
print("Some commands will dispatch Events, which in turn dispatch other Events")
|
232
|
+
print("###################")
|
233
|
+
|
224
234
|
# 0. Create `Blackboard` instance(s)
|
225
235
|
blackboard = Blackboard()
|
226
236
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
eventdispatch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
+
eventdispatch/aux1.py,sha256=5Kicx582h5zuZrzlea1bboTP4GOrV3GMJeKnTPN2suc,8179
|
3
|
+
eventdispatch/core.py,sha256=Pk0FUcQBCF2Bpq4-gfIc6fN8dxbXrgZV1Wjv8jx7O7E,6978
|
4
|
+
eventdispatch/example1.py,sha256=lN7QhCxR_uuNNx40s--dd8EAvVuSZLAQ7bWmDchbJzk,9026
|
5
|
+
eventdispatch-0.1.17.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
6
|
+
eventdispatch-0.1.17.dist-info/METADATA,sha256=RDdUaqeWTNS2B0R8-GrMv1q4vg54GBisUJrJuWHMAZ8,14121
|
7
|
+
eventdispatch-0.1.17.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
8
|
+
eventdispatch-0.1.17.dist-info/entry_points.txt,sha256=52gXPj1zjMPWj460qrTJ6RBn3XZKFoqgNdI4iDwYOGw,71
|
9
|
+
eventdispatch-0.1.17.dist-info/top_level.txt,sha256=EFnhw7vsL0B6wdGcB7YXLOUR-2QlTLFhAF8gwp43z-U,14
|
10
|
+
eventdispatch-0.1.17.dist-info/RECORD,,
|
@@ -1,10 +0,0 @@
|
|
1
|
-
eventdispatch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
eventdispatch/aux1.py,sha256=5Kicx582h5zuZrzlea1bboTP4GOrV3GMJeKnTPN2suc,8179
|
3
|
-
eventdispatch/core.py,sha256=Pk0FUcQBCF2Bpq4-gfIc6fN8dxbXrgZV1Wjv8jx7O7E,6978
|
4
|
-
eventdispatch/example1.py,sha256=44qw29A46soQ5E5QTkOJgR7q813eyUCPAX1BGF6LJk4,8628
|
5
|
-
eventdispatch-0.1.15.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
6
|
-
eventdispatch-0.1.15.dist-info/METADATA,sha256=iNAhsXogazzRnHhpgye6HQ9A07Z-vekkJt5a-ufSANw,14121
|
7
|
-
eventdispatch-0.1.15.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
8
|
-
eventdispatch-0.1.15.dist-info/entry_points.txt,sha256=52gXPj1zjMPWj460qrTJ6RBn3XZKFoqgNdI4iDwYOGw,71
|
9
|
-
eventdispatch-0.1.15.dist-info/top_level.txt,sha256=EFnhw7vsL0B6wdGcB7YXLOUR-2QlTLFhAF8gwp43z-U,14
|
10
|
-
eventdispatch-0.1.15.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|