Skip to content

Commit

Permalink
README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
divi255 committed Jul 19, 2019
1 parent 1ba12b1 commit 13ad6df
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,22 @@ all their public methods are thread-safe.
* compatibility with blocking functions
* async workers

## Why not concurrent.futures?

**concurrent.futures** is a great standard Python library which allows you to
execute specified tasks in a pool of workers.

**atasker** method *background_task* solves the same problem but in slightly
different way, providing priorities to the tasks, while *atasker* workers do
absolutely different job:

* in *concurrent.futures* worker is a pool member which executes the single
specified task.

* in *atasker* worker is an object, which continuously *generates* new tasks
with the specified interval or on external event, and executes them in thread
or multiprocessing pool.

## Code examples

### Start/stop
Expand Down
17 changes: 17 additions & 0 deletions doc/readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,23 @@ Why not standard asyncio loops?
- compatibility with blocking functions
- async workers

Why not concurrent.futures?
---------------------------

**concurrent.futures** is a great standard Python library which allows
you to execute specified tasks in a pool of workers.

**atasker** method *background\_task* solves the same problem but in
slightly different way, providing priorities to the tasks, while
*atasker* workers do absolutely different job:

- in *concurrent.futures* worker is a pool member which executes the
single specified task.

- in *atasker* worker is an object, which continuously *generates* new
tasks with the specified interval or on external event, and executes
them in thread or multiprocessing pool.

Code examples
-------------

Expand Down

0 comments on commit 13ad6df

Please sign in to comment.