Skip to content

Commit

Permalink
Clarify Example
Browse files Browse the repository at this point in the history
  • Loading branch information
tedivm committed Jun 25, 2024
1 parent 9902122 commit 170d30f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ import asyncio

from quasiqueue import QuasiQueue


async def writer(desired: int):
"""Feeds data to the Queue when it is low.
"""
return range(0, desired)
for x in range(0, desired):
yield x



async def reader(identifier: int|str):
Expand All @@ -44,7 +47,8 @@ runner = QuasiQueue(
writer=writer,
)

asyncio.run(runner.main())
if __name__ == '__main__':
asyncio.run(runner.main())
```

## Use Cases
Expand Down

0 comments on commit 170d30f

Please sign in to comment.