Skip to content

Commit

Permalink
Removed the event loop policy stubs
Browse files Browse the repository at this point in the history
We could've just referenced the actual classes instead from the
beginning. D'oh!
  • Loading branch information
agronholm committed Oct 4, 2017
1 parent 1c98be8 commit b477822
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
15 changes: 0 additions & 15 deletions asphalt/core/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,6 @@
policies = PluginContainer('asphalt.core.event_loop_policies')


def uvloop_policy():
import uvloop
return uvloop.EventLoopPolicy()


def gevent_policy():
import aiogevent
return aiogevent.EventLoopPolicy()


def tokio_policy():
import tokio
return tokio.TokioLoopPolicy()


def sigterm_handler(logger: Logger, event_loop: AbstractEventLoop) -> None:
if event_loop.is_running():
logger.info('Received SIGTERM')
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ doc =
console_scripts =
asphalt = asphalt.core.cli:main
asphalt.core.event_loop_policies =
uvloop = asphalt.core.runner:uvloop_policy [uvloop]
gevent = asphalt.core.runner:gevent_policy [gevent]
tokio = asphalt.core.runner:tokio_policy [tokio]
uvloop = uvloop:EventLoopPolicy [uvloop]
gevent = aiogevent:EventLoopPolicy [gevent]
tokio = tokio:TokioLoopPolicy [tokio]
[build_sphinx]
source-dir = docs
Expand Down

0 comments on commit b477822

Please sign in to comment.