eventdispatch 0.1.15__tar.gz → 0.1.17__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eventdispatch
3
- Version: 0.1.15
3
+ Version: 0.1.17
4
4
  Summary: Event Dispatch: a discrete time synchronizer
5
5
  Home-page: http://github.com/cyan-at/eventdispatch
6
6
  Author: Charlie Yan
@@ -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
 
@@ -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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eventdispatch
3
- Version: 0.1.15
3
+ Version: 0.1.17
4
4
  Summary: Event Dispatch: a discrete time synchronizer
5
5
  Home-page: http://github.com/cyan-at/eventdispatch
6
6
  Author: Charlie Yan
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "eventdispatch"
7
- version = "0.1.15"
7
+ version = "0.1.17"
8
8
  authors = [{name = "Charlie Yan", email = "cyanatg@gmail.com"}]
9
9
  dynamic = ["scripts", "dependencies"]
10
10
  description = "Event Dispatch: a discrete time synchronizer"
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='eventdispatch',
5
- version='0.1.15',
5
+ version='0.1.17',
6
6
  description='Event Dispatch, a discrete time synchronizer',
7
7
  url='http://github.com/cyan-at/eventdispatch',
8
8
  author='Charlie Yan',
File without changes
File without changes
File without changes