summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Asleson <tasleson@redhat.com>2016-12-12 16:13:27 -0600
committerTony Asleson <tasleson@redhat.com>2016-12-20 11:06:57 -0600
commit6fe6e8053a136af45174f153c00d404995af6e1c (patch)
tree200f9a8e09b71b3acd22ec14f8d07751f1d962b2
parentf47da0ad234118f4a7a5e64b7a8480f6afd8e1de (diff)
downloadlvm2-6fe6e8053a136af45174f153c00d404995af6e1c.tar.gz
lvmdbusd: Remove un-needed main thread execution
-rw-r--r--daemons/lvmdbusd/request.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/daemons/lvmdbusd/request.py b/daemons/lvmdbusd/request.py
index a2c2ac99b..7c5da461b 100644
--- a/daemons/lvmdbusd/request.py
+++ b/daemons/lvmdbusd/request.py
@@ -54,12 +54,15 @@ class RequestEntry(object):
r.timer_expired()
def _return_job(self):
+ # Return job is only called when we create a request object or when
+ # we pop a timer. In both cases we are running in the correct context
+ # and do not need to schedule the call back in main context.
self._job = Job(self, self._job_state)
cfg.om.register_object(self._job, True)
if self._return_tuple:
- mt_async_result(self.cb, ('/', self._job.dbus_object_path()))
+ self.cb(('/', self._job.dbus_object_path()))
else:
- mt_async_result(self.cb, self._job.dbus_object_path())
+ self.cb(self._job.dbus_object_path())
def run_cmd(self):
try: