eventdispatch 0.1.17__tar.gz → 0.1.19__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.
- {eventdispatch-0.1.17 → eventdispatch-0.1.19}/PKG-INFO +8 -6
- eventdispatch-0.1.19/README.md +20 -0
- {eventdispatch-0.1.17 → eventdispatch-0.1.19}/eventdispatch/example1.py +10 -10
- {eventdispatch-0.1.17 → eventdispatch-0.1.19}/eventdispatch.egg-info/PKG-INFO +8 -6
- {eventdispatch-0.1.17 → eventdispatch-0.1.19}/pyproject.toml +2 -2
- {eventdispatch-0.1.17 → eventdispatch-0.1.19}/setup.py +1 -1
- eventdispatch-0.1.17/README.md +0 -18
- {eventdispatch-0.1.17 → eventdispatch-0.1.19}/LICENSE +0 -0
- {eventdispatch-0.1.17 → eventdispatch-0.1.19}/README.rst +0 -0
- {eventdispatch-0.1.17 → eventdispatch-0.1.19}/eventdispatch/__init__.py +0 -0
- {eventdispatch-0.1.17 → eventdispatch-0.1.19}/eventdispatch/aux1.py +0 -0
- {eventdispatch-0.1.17 → eventdispatch-0.1.19}/eventdispatch/core.py +0 -0
- {eventdispatch-0.1.17 → eventdispatch-0.1.19}/eventdispatch.egg-info/SOURCES.txt +0 -0
- {eventdispatch-0.1.17 → eventdispatch-0.1.19}/eventdispatch.egg-info/dependency_links.txt +0 -0
- {eventdispatch-0.1.17 → eventdispatch-0.1.19}/eventdispatch.egg-info/entry_points.txt +0 -0
- {eventdispatch-0.1.17 → eventdispatch-0.1.19}/eventdispatch.egg-info/top_level.txt +0 -0
- {eventdispatch-0.1.17 → eventdispatch-0.1.19}/setup.cfg +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: eventdispatch
|
3
|
-
Version: 0.1.
|
4
|
-
Summary: Event Dispatch:
|
3
|
+
Version: 0.1.19
|
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
|
-
#
|
220
|
-
Event Dispatch:
|
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
|
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:
|
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,20 @@
|
|
1
|
+
# <a href="https://github.com/cyan-at/eventdispatch" target="_blank">eventdispatch</a>
|
2
|
+
Event Dispatch: discrete time synchronization
|
3
|
+
|
4
|
+
## Documentation
|
5
|
+
|
6
|
+
The latest documentation on <a href="https://eventdispatch.readthedocs.io/en/latest/" target="_blank">readthedocs</a>
|
7
|
+
|
8
|
+
## python3: apt installation
|
9
|
+
```
|
10
|
+
sudo add-apt-repository ppa:cyanatlaunchpad/python3-eventdispatch-ppa
|
11
|
+
sudo apt update
|
12
|
+
sudo apt install python3-eventdispatch
|
13
|
+
```
|
14
|
+
|
15
|
+
## python3: <a href="https://pypi.org/project/eventdispatch/" target="_blank">pip</a> installation
|
16
|
+
```
|
17
|
+
virtualenv try-eventdispatch
|
18
|
+
. try-eventdispatch/bin/activate
|
19
|
+
pip install eventdispatch
|
20
|
+
```
|
@@ -38,13 +38,13 @@ class WorkItemEvent(CommonEvent):
|
|
38
38
|
self.blackboard[event_dispatch.cv_name].release()
|
39
39
|
|
40
40
|
def finish(self, event_dispatch, *args, **kwargs):
|
41
|
-
self.log("finish!", args, kwargs)
|
41
|
+
self.log("WorkItemEvent finish!", args, kwargs)
|
42
42
|
|
43
43
|
class UncertaintEvent1(CommonEvent):
|
44
44
|
debug_color = bcolors.CYAN
|
45
45
|
|
46
46
|
def dispatch(self, event_dispatch, *args, **kwargs):
|
47
|
-
self.log("dispatch!", args, kwargs)
|
47
|
+
self.log("UncertaintEvent1 dispatch!", args, kwargs)
|
48
48
|
|
49
49
|
time.sleep(random.randint(1, 5))
|
50
50
|
|
@@ -52,7 +52,7 @@ class UncertaintEvent1(CommonEvent):
|
|
52
52
|
self.blackboard["result1"] = random.randint(1, 5)
|
53
53
|
|
54
54
|
def finish(self, event_dispatch, *args, **kwargs):
|
55
|
-
self.log("finish!", args, kwargs)
|
55
|
+
self.log("UncertaintEvent1 finish!", args, kwargs)
|
56
56
|
|
57
57
|
with self.blackboard["result_mutex"]:
|
58
58
|
if self.blackboard["result2"] > 0:
|
@@ -77,7 +77,7 @@ class UncertaintEvent2(CommonEvent):
|
|
77
77
|
debug_color = bcolors.MAGENTA
|
78
78
|
|
79
79
|
def dispatch(self, event_dispatch, *args, **kwargs):
|
80
|
-
self.log("dispatch!", args, kwargs)
|
80
|
+
self.log("UncertaintEvent2 dispatch!", args, kwargs)
|
81
81
|
|
82
82
|
time.sleep(random.randint(1, 10))
|
83
83
|
|
@@ -85,7 +85,7 @@ class UncertaintEvent2(CommonEvent):
|
|
85
85
|
self.blackboard["result2"] = random.randint(1, 10)
|
86
86
|
|
87
87
|
def finish(self, event_dispatch, *args, **kwargs):
|
88
|
-
self.log("finish!", args, kwargs)
|
88
|
+
self.log("UncertaintEvent2 finish!", args, kwargs)
|
89
89
|
|
90
90
|
with self.blackboard["result_mutex"]:
|
91
91
|
if self.blackboard["result1"] > 0:
|
@@ -110,13 +110,13 @@ class CheckEvent1(CommonEvent):
|
|
110
110
|
debug_color = bcolors.RED
|
111
111
|
|
112
112
|
def dispatch(self, event_dispatch, *args, **kwargs):
|
113
|
-
self.log("dispatch!", args, kwargs)
|
113
|
+
self.log("CheckEvent1 dispatch!", args, kwargs)
|
114
114
|
|
115
115
|
s = args[1]
|
116
|
-
self.log("sum", s)
|
116
|
+
self.log("CheckEvent1 sum", s)
|
117
117
|
|
118
118
|
if s > 5 and args[0] > 0:
|
119
|
-
self.log("
|
119
|
+
self.log("CheckEvent1: sum big enough to continue")
|
120
120
|
|
121
121
|
self.blackboard[event_dispatch.cv_name].acquire()
|
122
122
|
self.blackboard[event_dispatch.queue_name].extend([
|
@@ -128,12 +128,12 @@ class CheckEvent1(CommonEvent):
|
|
128
128
|
self.blackboard[event_dispatch.cv_name].notify(1)
|
129
129
|
self.blackboard[event_dispatch.cv_name].release()
|
130
130
|
else:
|
131
|
-
self.log("
|
131
|
+
self.log("CheckEvent1: sum <= 5 or drained remaining WorkItems, prompting again")
|
132
132
|
|
133
133
|
self.blackboard["input_sem"].release()
|
134
134
|
|
135
135
|
def finish(self, event_dispatch, *args, **kwargs):
|
136
|
-
self.log("finish!", args, kwargs)
|
136
|
+
self.log("CheckEvent1 finish!", args, kwargs)
|
137
137
|
|
138
138
|
# this is an example of an 'Actor' / 'continuous-time' process
|
139
139
|
# a specialist in the system, that injects entrypoint Event(s)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: eventdispatch
|
3
|
-
Version: 0.1.
|
4
|
-
Summary: Event Dispatch:
|
3
|
+
Version: 0.1.19
|
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
|
-
#
|
220
|
-
Event Dispatch:
|
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
|
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:
|
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
|
```
|
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "eventdispatch"
|
7
|
-
version = "0.1.
|
7
|
+
version = "0.1.19"
|
8
8
|
authors = [{name = "Charlie Yan", email = "cyanatg@gmail.com"}]
|
9
9
|
dynamic = ["scripts", "dependencies"]
|
10
|
-
description = "Event Dispatch:
|
10
|
+
description = "Event Dispatch: discrete time synchronization"
|
11
11
|
readme = "README.md"
|
12
12
|
requires-python = ">=3.9"
|
13
13
|
classifiers = [
|
eventdispatch-0.1.17/README.md
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# [eventdispatch](https://github.com/cyan-at/eventdispatch)
|
2
|
-
Event Dispatch: a discrete time synchronizer
|
3
|
-
|
4
|
-
## Documentation
|
5
|
-
|
6
|
-
The latest documentation on [readthedocs](https://eventdispatch.readthedocs.io/en/latest/)
|
7
|
-
|
8
|
-
## python3: apt installation
|
9
|
-
```
|
10
|
-
sudo add-apt-repository ppa:cyanatlaunchpad/python3-eventdispatch-ppa
|
11
|
-
sudo apt update
|
12
|
-
sudo apt install python3-eventdispatch
|
13
|
-
```
|
14
|
-
|
15
|
-
## python3: [pip](https://pypi.org/project/eventdispatch/) installation
|
16
|
-
```
|
17
|
-
pip install eventdispatch
|
18
|
-
```
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|