Skip to content

Commit

Permalink
Removed the asphalt.core.concurrency package
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Apr 14, 2016
1 parent 4ed7637 commit 909fe37
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 154 deletions.
82 changes: 0 additions & 82 deletions asphalt/core/concurrency.py

This file was deleted.

9 changes: 0 additions & 9 deletions asphalt/core/pytest_plugin.py

This file was deleted.

2 changes: 0 additions & 2 deletions asphalt/core/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from typeguard import check_argument_types

from asphalt.core.component import Component
from asphalt.core.concurrency import set_event_loop
from asphalt.core.context import Context

__all__ = ('run_application',)
Expand Down Expand Up @@ -54,7 +53,6 @@ def run_application(component: Component, *, max_threads: int=None,
max_threads = max_threads if max_threads is not None else os.cpu_count()
event_loop = asyncio.get_event_loop()
event_loop.set_default_executor(ThreadPoolExecutor(max_threads))
set_event_loop(event_loop)

logger = getLogger(__name__)
logger.info('Starting application')
Expand Down
11 changes: 5 additions & 6 deletions docs/versionhistory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ Version history

- *BACKWARD INCOMPATIBLE* Dropped Python 3.4 support in order to make the code fully rely on the
new ``async``/``await``, ``async for`` and ``async with`` language additions
- *BACKWARD INCOMPATIBLE* Dropped the ``asphalt.core.concurrency`` module in favor of the
``asyncio_extras`` library
- *BACKWARD INCOMPATIBLE* De-emphasized the ability to run code in worker threads.
It is now recommended to minimize the use of worker threads.
As a result, the ``@asynchronous`` decorator has been removed.
- *BACKWARD INCOMPATIBLE* Dropped the ``@blocking`` decorator in favor of the ``@threadpool``
decorator from ``asyncio_extras``
- *BACKWARD INCOMPATIBLE* Removed the deprecated ``blocking`` and ``asynchronous`` aliases from the
``asphalt.core.util`` module
As such, Asphalt components are no longer required to transparently work outside of the event
loop thread. Instead, use``asyncio_extras.threads.call_async()`` to call asynchronous code if
absolutely necessary.
- *BACKWARD INCOMPATIBLE* Removed regular context manager support from the ``Context`` class
(asynchronous context manager support still remains)
- *BACKWARD INCOMPATIBLE* Modified event dispatch logic in ``EventSource`` to always run all
Expand Down
1 change: 0 additions & 1 deletion tests/conftest.py

This file was deleted.

54 changes: 0 additions & 54 deletions tests/test_concurrency.py

This file was deleted.

0 comments on commit 909fe37

Please sign in to comment.