Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Jylpah authored Mar 24, 2024
1 parent 7192eed commit 3359a96
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Queutils *[Queue Utils]* is a package of handy Python queue classes:
# AsyncQueue

[`AsyncQueue`](docs/asyncqueue.md) is a async wrapper for non-async `queue.Queue`. It can be used to create
an `asyncio.Queue` compatible out of a (non-async) `multiprocessing.Queue`. This is handy to have `async` code running in `multiprocessing` processes and yet be able to communicate with the parent via (non-async) managed `multiprocessing.Queue` queue.
an `asyncio.Queue` compatible interface to a (non-async) managed `multiprocessing.Queue` and thus enable `async` code in parent/child processes to communicate over `multiprocessing.Queue` as it were an `asyncio.Queue`.

## Features

Expand All @@ -25,6 +25,12 @@ an `asyncio.Queue` compatible out of a (non-async) `multiprocessing.Queue`. This

[`IterableQueue`](docs/iterablequeue.md) is an `asyncio.Queue` subclass that is `AsyncIterable[T]` i.e. it can be
iterated in `async for` loop. `IterableQueue` terminates automatically when the queue has been filled and emptied.

The `IterableQueue` requires "producers" (functions addinng items to the queue) to register themselves and it
keeps count of registers who are "finished" adding items to the queue. Once all the registered producers are
"finished", the queue enters into "filled" state and no new items can be added anymore. Once an
"filled" queue is emptied, the queue becomes "done" and all new attempts to `get()` and item will
`raise QueueDone` exception.

## Features

Expand All @@ -39,7 +45,9 @@ iterated in `async for` loop. `IterableQueue` terminates automatically when the

# FileQueue

[`FileQueue`](docs/filequeue.md) builds a queue (`IterableQueue[pathlib.Path]`) of the matching files found based on search parameters given. It can search both list of files or directories or mixed. Async method `FileQueue.mk_queue()` searches subdirectories of given directories.
[`FileQueue`](docs/filequeue.md) builds a queue (`IterableQueue[pathlib.Path]`) of the matching
files found based on search parameters given. It can search both list of files or directories or
mixed. Async method `FileQueue.mk_queue()` searches subdirectories of given directories.

## Features

Expand Down

0 comments on commit 3359a96

Please sign in to comment.