Skip to content

Commit

Permalink
Merge pull request #4 from calgray/0.1.2
Browse files Browse the repository at this point in the history
Update license and version 0.1.2
  • Loading branch information
calgray committed Jan 7, 2025
2 parents 4b1f2d6 + efc311c commit 9cef00a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

[![Test and build](https://github.com/calgray/athreading/actions/workflows/ci.yml/badge.svg)](https://github.com/calgray/athreading/actions/workflows/ci.yml)

`athreading` is an asynchronous threading library for running and synchronizing worker threads with asyncio.
`athreading` is an asynchronous threading library for running and synchronizing I/O threads with asyncio.

Note: Python GIL only allows multi-threaded I/O parallelism and not multi-threaded CPU parallelism.

## Usage

Although the python GIL prevents true parallelism, existing source code using synchronous sleep/wait calls can be offloaded to worker threads to avoid blocking the async I/O loop.
Synchronous I/O functions and generators using sleep/wait operations can be run asyncronoously by offloading to worker threads and avoid blocking the async I/O loop.

### Callable → Coroutine

Expand Down
13 changes: 7 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "athreading"
version = "0.1.1"
version = "0.1.2"
description = ""
authors = ["Callan Gray <cal.j.gray@gmail.com>"]
license = "BSD-3-Clause"
packages = [{ include = "athreading", from = "src" }]

[tool.poetry.dependencies]
python = "^3.9"
overrides = "^7.4.0"

[tool.poetry.dev-dependencies]
[tool.poetry.group.test.dependencies]
pytest = "^7.0"
pytest-cov = "^4.0.0"
pytest-mypy = "^0.10.0"
Expand Down Expand Up @@ -62,7 +67,3 @@ profile = "black"

[tool.pytest.ini_options]
addopts = "-v --mypy -p no:warnings --cov=athreading --cov-report=html --doctest-modules --ignore=athreading/__main__.py"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
2 changes: 1 addition & 1 deletion src/athreading/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from .generator import ThreadedAsyncGenerator, generate
from .iterator import ThreadedAsyncIterator, _fiterate, iterate

__version__ = "0.1.1"
__version__ = "0.1.2"


__all__ = (
Expand Down
2 changes: 1 addition & 1 deletion tests/test_athreading.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

def test_version():
"""Check that the version is acceptable."""
assert __version__ == "0.1.1"
assert __version__ == "0.1.2"

0 comments on commit 9cef00a

Please sign in to comment.