Skip to content

Commit

Permalink
minor docu fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
semiversus committed Sep 17, 2018
1 parent c9465c1 commit 33d87c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ and throttle emits (via `op.debounce` and `op.throttle`), sample and delay (via
`op.Sample` and `op.Delay`) or start coroutines and when finishing the result
will be emitted.

.. code-block:: python
>>> async def long_running_coro(value):
... await asyncio.sleep(3)
... return value + 1
Expand All @@ -129,6 +131,8 @@ or interrupt mode is available.

Every publisher can be awaited in coroutines:

.. code-block:: python
await signal_publisher
Install
Expand Down
2 changes: 1 addition & 1 deletion broqer/publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def notify(self, value: Any) -> asyncio.Future:
return Publisher.notify(self, value)

def reset_state(self, value=NONE):
""" resets the state. Behavior for .subscribe() and .get() will be
""" Resets the state. Behavior for .subscribe() and .get() will be
like a stateless Publisher until next .emit()
"""
self._state = value

0 comments on commit 33d87c0

Please sign in to comment.