Skip to content

Commit

Permalink
docs: explain how to use disthread
Browse files Browse the repository at this point in the history
  • Loading branch information
vinyguedess committed May 8, 2020
1 parent 2a48f9e commit 8777793
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,18 @@ To listen and dispatch events is very simple:
first="param",
second="param",
third="param")
Should I wait all callbacks to end ?
====================================
Nope. You can "threadily" dispatch your events so they
don't need to be waited for the main process.

.. code :: python
from onany import disthread, listener
@listener("event.name")
def on_event_name():
print("I'm gonna be executed on another thread")
>>> disthread("event.name")
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
setup(
name="onany",
packages=["onany"],
version="0.1.2",
version="0.1.3",
license="MIT",
description="Event manager library",
long_description=readme,
Expand Down

0 comments on commit 8777793

Please sign in to comment.