AsynchronousLock: override _async_wait_cb
authorZac Medico <zmedico@gentoo.org>
Tue, 1 Jan 2013 11:08:49 +0000 (03:08 -0800)
committerZac Medico <zmedico@gentoo.org>
Tue, 1 Jan 2013 11:08:49 +0000 (03:08 -0800)
pym/_emerge/AsynchronousLock.py

index 2de1acdcfb3d12b6add461cf245daa6f98efaef5..520541432f53b37044e7cf7c97383eecac245c3e 100644 (file)
@@ -119,12 +119,12 @@ class _LockThread(AbstractPollTask):
        def _run_lock(self):
                self._lock_obj = lockfile(self.path, wantnewlockfile=True)
                # Thread-safe callback to EventLoop
-               self.scheduler.idle_add(self._run_lock_cb)
+               self._async_wait()
 
-       def _run_lock_cb(self):
+       def _async_wait_cb(self):
                self._unregister()
                self.returncode = os.EX_OK
-               self.wait()
+               AbstractPollTask._async_wait_cb(self)
                return False
 
        def _cancel(self):