Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michiel Cottaar
fslpy
Commits
35902a8d
Commit
35902a8d
authored
7 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Users of async updated to idle
parent
9739482f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fsl/data/imagewrapper.py
+2
-2
2 additions, 2 deletions
fsl/data/imagewrapper.py
fsl/utils/notifier.py
+5
-5
5 additions, 5 deletions
fsl/utils/notifier.py
with
7 additions
and
7 deletions
fsl/data/imagewrapper.py
+
2
−
2
View file @
35902a8d
...
...
@@ -45,7 +45,7 @@ import numpy as np
import
nibabel
as
nib
import
fsl.utils.notifier
as
notifier
import
fsl.utils.
async
as
async
import
fsl.utils.
idle
as
idle
log
=
logging
.
getLogger
(
__name__
)
...
...
@@ -219,7 +219,7 @@ class ImageWrapper(notifier.Notifier):
self
.
loadData
()
if
threaded
:
self
.
__taskThread
=
async
.
TaskThread
()
self
.
__taskThread
=
idle
.
TaskThread
()
self
.
__taskThread
.
daemon
=
True
self
.
__taskThread
.
start
()
...
...
This diff is collapsed.
Click to expand it.
fsl/utils/notifier.py
+
5
−
5
View file @
35902a8d
...
...
@@ -17,7 +17,7 @@ import collections
import
six
import
fsl.utils.
async
as
async
import
fsl.utils.
idle
as
idle
import
fsl.utils.weakfuncref
as
weakfuncref
...
...
@@ -133,7 +133,7 @@ class Notifier(object):
:arg topic: Optional topic on which to listen for notifications.
: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
:meth:`notify` method. Defaults to ``False``.
...
...
@@ -330,7 +330,7 @@ class Notifier(object):
All other arguments passed to this method are ignored.
.. 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`.
"""
...
...
@@ -370,8 +370,8 @@ class Notifier(object):
elif
not
listener
.
enabled
:
continue
elif
listener
.
runOnIdle
:
async
.
idle
(
callback
,
self
,
topic
,
value
)
else
:
callback
(
self
,
topic
,
value
)
elif
listener
.
runOnIdle
:
idle
.
idle
(
callback
,
self
,
topic
,
value
)
else
:
callback
(
self
,
topic
,
value
)
def
__getListeners
(
self
,
topic
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment