Browse Source

readme updated

gwillz 3 years ago
parent
commit
adc9876d59
4 changed files with 20 additions and 7 deletions
  1. 3 0
      .gitlab-ci.yml
  2. 12 6
      README.md
  3. 1 1
      setup.py
  4. 4 0
      test.py

+ 3 - 0
.gitlab-ci.yml

@@ -8,6 +8,7 @@ epydoc:
  stage: docs
  only:
  - master
+ - tags
  artifacts:
   paths:
   - html/
@@ -25,6 +26,7 @@ pypi:
  stage: build
  only:
  - master
+ - tags
  artifacts:
   paths:
   - dist/
@@ -71,6 +73,7 @@ deploy:
  - pypi
  only:
  - master
+ - tags
  tags:
  - linux
  - mk2-docs

+ 12 - 6
README.md

@@ -5,14 +5,20 @@ Asynchronous Events
 ![coverage report](https://git.gwillz.com.au/mk2/avent/badges/master/coverage.svg)
 
 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

+ 1 - 1
setup.py

@@ -10,7 +10,7 @@ def get_long_description(fname):
         return open(os.path.join(os.path.dirname(__file__), fname)).read()
 
 setup(name='avent',
-      version="0.6.10",
+      version="0.6",
       description="A library that intends to make inter-thread communication easier among classes",
       long_description=get_long_description('README.md'),
       author='Gwilyn Saunders',

+ 4 - 0
test.py

@@ -2,6 +2,10 @@ from __future__ import print_function
 from avent import Avent, Abject, StopThread, handleMainEvents
 import threading, time, sys
 
+#
+# FIXME: Out of date!
+#
+
 
 class A1(Abject):