Skip to content

Commit e4c5530

Browse files
Add asyncio support for running the workflow
Updated README to include asyncio for running the workflow.
1 parent 9d73742 commit e4c5530

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ pip install amrita-sense
4949
## Quick Look
5050

5151
```python
52+
import asyncio
5253
from amrita_sense import Node, WorkflowInterpreter as WorkflowPC, IF, NOP
5354

5455
@Node()
@@ -59,7 +60,9 @@ def action(): print("Done")
5960

6061
flow = IF(condition, action) >> NOP
6162
pc = WorkflowPC(flow.render())
62-
pc.run_sync()
63+
64+
if __name__ == "__main__":
65+
asyncio.run(pc.run())
6366
```
6467

6568
See more demos in `demos/`

0 commit comments

Comments
 (0)