Skip to content
Snippets Groups Projects
Commit 35902a8d authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

Users of async updated to idle

parent 9739482f
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,7 @@ import numpy as np ...@@ -45,7 +45,7 @@ import numpy as np
import nibabel as nib import nibabel as nib
import fsl.utils.notifier as notifier import fsl.utils.notifier as notifier
import fsl.utils.async as async import fsl.utils.idle as idle
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
...@@ -219,7 +219,7 @@ class ImageWrapper(notifier.Notifier): ...@@ -219,7 +219,7 @@ class ImageWrapper(notifier.Notifier):
self.loadData() self.loadData()
if threaded: if threaded:
self.__taskThread = async.TaskThread() self.__taskThread = idle.TaskThread()
self.__taskThread.daemon = True self.__taskThread.daemon = True
self.__taskThread.start() self.__taskThread.start()
......
...@@ -17,7 +17,7 @@ import collections ...@@ -17,7 +17,7 @@ import collections
import six import six
import fsl.utils.async as async import fsl.utils.idle as idle
import fsl.utils.weakfuncref as weakfuncref import fsl.utils.weakfuncref as weakfuncref
...@@ -133,7 +133,7 @@ class Notifier(object): ...@@ -133,7 +133,7 @@ class Notifier(object):
:arg topic: Optional topic on which to listen for notifications. :arg topic: Optional topic on which to listen for notifications.
:arg runOnIdle: If ``True``, this listener will be called on the main :arg runOnIdle: If ``True``, this listener will be called on the main
thread, via the :func:`.async.idle` function. thread, via the :func:`.idle.idle` function.
Otherwise this function will be called directly by the Otherwise this function will be called directly by the
:meth:`notify` method. Defaults to ``False``. :meth:`notify` method. Defaults to ``False``.
...@@ -330,7 +330,7 @@ class Notifier(object): ...@@ -330,7 +330,7 @@ class Notifier(object):
All other arguments passed to this method are ignored. All other arguments passed to this method are ignored.
.. note:: Listeners registered with ``runOnIdle=True`` are called .. note:: Listeners registered with ``runOnIdle=True`` are called
via :func:`async.idle`. Other listeners are called directly. via :func:`idle.idle`. Other listeners are called directly.
See :meth:`register`. See :meth:`register`.
""" """
...@@ -370,8 +370,8 @@ class Notifier(object): ...@@ -370,8 +370,8 @@ class Notifier(object):
elif not listener.enabled: elif not listener.enabled:
continue continue
elif listener.runOnIdle: async.idle(callback, self, topic, value) elif listener.runOnIdle: idle.idle(callback, self, topic, value)
else: callback( self, topic, value) else: callback( self, topic, value)
def __getListeners(self, topic): def __getListeners(self, topic):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment