eventdispatch 0.1.16__py3-none-any.whl → 0.1.18__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 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
- return False
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
 
@@ -220,6 +225,12 @@ class KeyboardThread(threading.Thread):
220
225
  local_hb = self.mutable_hb['hb']
221
226
 
222
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
+
223
234
  # 0. Create `Blackboard` instance(s)
224
235
  blackboard = Blackboard()
225
236
 
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eventdispatch
3
- Version: 0.1.16
4
- Summary: Event Dispatch: a discrete time synchronizer
3
+ Version: 0.1.18
4
+ Summary: Event Dispatch: discrete time synchronization
5
5
  Home-page: http://github.com/cyan-at/eventdispatch
6
6
  Author: Charlie Yan
7
7
  Author-email: Charlie Yan <cyanatg@gmail.com>
@@ -216,12 +216,12 @@ Requires-Python: >=3.9
216
216
  Description-Content-Type: text/markdown
217
217
  License-File: LICENSE
218
218
 
219
- # [eventdispatch](https://github.com/cyan-at/eventdispatch)
220
- Event Dispatch: a discrete time synchronizer
219
+ # <a href="https://github.com/cyan-at/eventdispatch" target="_blank">eventdispatch</a>
220
+ Event Dispatch: discrete time synchronization
221
221
 
222
222
  ## Documentation
223
223
 
224
- The latest documentation on [readthedocs](https://eventdispatch.readthedocs.io/en/latest/)
224
+ The latest documentation on <a href="https://eventdispatch.readthedocs.io/en/latest/" target="_blank">readthedocs</a>
225
225
 
226
226
  ## python3: apt installation
227
227
  ```
@@ -230,7 +230,9 @@ sudo apt update
230
230
  sudo apt install python3-eventdispatch
231
231
  ```
232
232
 
233
- ## python3: [pip](https://pypi.org/project/eventdispatch/) installation
233
+ ## python3: <a href="https://pypi.org/project/eventdispatch/" target="_blank">pip</a> installation
234
234
  ```
235
+ virtualenv try-eventdispatch
236
+ . try-eventdispatch/bin/activate
235
237
  pip install eventdispatch
236
238
  ```
@@ -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.18.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
6
+ eventdispatch-0.1.18.dist-info/METADATA,sha256=FvXF17KmsQzHaqbpVWGBjhb9MSthPIyS_DNj6In13PY,14266
7
+ eventdispatch-0.1.18.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
8
+ eventdispatch-0.1.18.dist-info/entry_points.txt,sha256=52gXPj1zjMPWj460qrTJ6RBn3XZKFoqgNdI4iDwYOGw,71
9
+ eventdispatch-0.1.18.dist-info/top_level.txt,sha256=EFnhw7vsL0B6wdGcB7YXLOUR-2QlTLFhAF8gwp43z-U,14
10
+ eventdispatch-0.1.18.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=Yclwdl37cyq4NQMplBNiw1MYMuQGjU1up89lzdClyso,8588
5
- eventdispatch-0.1.16.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
6
- eventdispatch-0.1.16.dist-info/METADATA,sha256=TmtRfNr66qbdv4kKDAG-v8PMD_MKNkoJLBDnGXnpGpk,14121
7
- eventdispatch-0.1.16.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
8
- eventdispatch-0.1.16.dist-info/entry_points.txt,sha256=52gXPj1zjMPWj460qrTJ6RBn3XZKFoqgNdI4iDwYOGw,71
9
- eventdispatch-0.1.16.dist-info/top_level.txt,sha256=EFnhw7vsL0B6wdGcB7YXLOUR-2QlTLFhAF8gwp43z-U,14
10
- eventdispatch-0.1.16.dist-info/RECORD,,