Skip to content

Commit

Permalink
fixes #31
Browse files Browse the repository at this point in the history
Only emit debug message "Using default executor" when the default
executor is being used.
  • Loading branch information
harvimt committed Feb 17, 2015
1 parent d0b1810 commit b7699dc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions quamash/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,11 +493,13 @@ def run_in_executor(self, executor, callback, *args):
return f
callback, args = callback.callback, callback.args

executor = executor or self.__default_executor
if executor is None:
self._logger.debug('Using default executor')
executor = self.__default_executor

if executor is None:
self._logger.debug('Creating default executor')
executor = self.__default_executor = QThreadExecutor()
self._logger.debug('Using default executor')

return asyncio.wrap_future(executor.submit(callback, *args))

Expand Down

0 comments on commit b7699dc

Please sign in to comment.