Skip to content

Commit

Permalink
Prepare v0.4.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
tkem committed Aug 14, 2015
1 parent 5b2e613 commit 9d36f4c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
0.4.2 2015-08-14
----------------

- Use asynchronous D-Bus calls to improve performance on Raspberry Pi.


0.4.1 2015-08-11
----------------

Expand Down
2 changes: 1 addition & 1 deletion mopidy_dleyna/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from mopidy import config, exceptions, ext

__version__ = '0.4.1'
__version__ = '0.4.2'

logger = logging.getLogger(__name__)

Expand Down
8 changes: 3 additions & 5 deletions mopidy_dleyna/dleyna.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import logging
import sys
import threading
import time

import dbus

Expand Down Expand Up @@ -38,16 +37,15 @@ def _exc_future(exc_info):


def _dbus_future(func, *args, **kwargs):
# TODO: remove timing info
# import time
future = pykka.ThreadingFuture()
t = time.time()

def on_reply(result):
logger.info('%s reply after %.3fs', func, time.time() - t)
# logger.info('%s reply after %.3fs', func, time.time() - t)
future.set(result)

def on_error(e):
logger.info('%s error after %.3fs', func, time.time() - t)
# logger.info('%s error after %.3fs', func, time.time() - t)
future.set_exception(exc_info=(type(e), e, None))

func(*args, reply_handler=on_reply, error_handler=on_error, **kwargs)
Expand Down

0 comments on commit 9d36f4c

Please sign in to comment.