|
@@ -5,14 +5,20 @@ Asynchronous Events
|
|
|

|
|
|
|
|
|
This library provides a simple event interface that can be used between threads.
|
|
|
-Functionally, it should be same as using the 20 line `event.py` implementation.
|
|
|
+Functionally, it should be same as using the minimalistic `event.py` implementation.
|
|
|
|
|
|
-Minor alterations to existing code is required:
|
|
|
-- a thread's _target function_ should be an _instance method_ of an `Abject`
|
|
|
-- if not an `Abject` the event will be executed in a sub-main thread
|
|
|
-- threads should instead be a `StopThread`, to ensure child threads exit cleanly
|
|
|
+Minor alterations to existing code may be required:
|
|
|
+- threads should target the `loop()` function of an `Abject`
|
|
|
+- if not, the thread loop should call something like `if self._handleEvents(): break`
|
|
|
+- handler functions do not _need_ to accept sender or eargs parameters
|
|
|
|
|
|
-An example usage is outlined in `test.py`
|
|
|
+An given event handler will be executed within an Abject's thread loop. Avents
|
|
|
+discovers this by using the instance of a method-function or the `sender` parameter
|
|
|
+of the `fire()` function. If neither can be found, the handler is put on the
|
|
|
+`_sub_main` event stack that is executed in the `run_forever()` helper function.
|
|
|
+
|
|
|
+_Avents_ includes the `wait_for` and `fire_me` functions for status polling and
|
|
|
+dynamic arguments, respectively.
|
|
|
|
|
|
|
|
|
Authors
|