Revert "AsynchronousLock: override _async_wait_cb"
authorZac Medico <zmedico@gentoo.org>
Tue, 1 Jan 2013 22:37:45 +0000 (14:37 -0800)
committerZac Medico <zmedico@gentoo.org>
Tue, 1 Jan 2013 22:37:45 +0000 (14:37 -0800)
This reverts commit 83cfc04df383b56592b89f1dc58428c0e8d09925.
This override could be bad if the base class needs to call _async_wait
for some reason.

pym/_emerge/AsynchronousLock.py

index 520541432f53b37044e7cf7c97383eecac245c3e..2de1acdcfb3d12b6add461cf245daa6f98efaef5 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._async_wait()
+               self.scheduler.idle_add(self._run_lock_cb)
 
-       def _async_wait_cb(self):
+       def _run_lock_cb(self):
                self._unregister()
                self.returncode = os.EX_OK
-               AbstractPollTask._async_wait_cb(self)
+               self.wait()
                return False
 
        def _cancel(self):