代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/anaconda 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 05bda4c50c9df594a6b266ac74b60478da4c532c Mon Sep 17 00:00:00 2001
From: fengtao <fengtao40@huawei.com>
Date: Wed, 12 Feb 2020 15:52:08 +0800
Subject: [PATCH] Remove initThreading method from pyanaconda threading
---
anaconda.py | 5 +----
pyanaconda/threading.py | 17 +----------------
2 files changed, 2 insertions(+), 20 deletions(-)
diff --git a/anaconda.py b/anaconda.py
index 14048e7..52c8826 100755
--- a/anaconda.py
+++ b/anaconda.py
@@ -274,10 +274,7 @@ if __name__ == "__main__":
setup_python_path()
# init threading before Gtk can do anything and before we start using threads
- # initThreading initializes the threadMgr instance, import it afterwards
- from pyanaconda.threading import initThreading, AnacondaThread, threadMgr
- initThreading()
-
+ from pyanaconda.threading import AnacondaThread, threadMgr
from pyanaconda.core.i18n import _
from pyanaconda.addons import collect_addon_paths
diff --git a/pyanaconda/threading.py b/pyanaconda/threading.py
index a86003d..e0ab802 100644
--- a/pyanaconda/threading.py
+++ b/pyanaconda/threading.py
@@ -44,10 +44,6 @@ class ThreadManager(object):
self._objs_lock = threading.RLock()
self._errors = {}
self._errors_lock = threading.RLock()
- self._main_thread = threading.main_thread()
-
- def set_current_thread_as_main(self):
- self._main_thread = threading.current_thread()
def __call__(self):
return self
@@ -176,9 +172,7 @@ class ThreadManager(object):
def in_main_thread(self):
"""Return True if it is run in the main thread."""
-
- cur_thread = threading.current_thread()
- return cur_thread is self._main_thread
+ return threading.current_thread() is threading.main_thread()
@property
def running(self):
@@ -293,13 +287,4 @@ class AnacondaThread(threading.Thread):
self._target_stopped()
-def initThreading():
- """Set up threading for anaconda's use. This method must be called before
- any GTK or threading code is called, or else threads will only run when
- an event is triggered in the GTK main loop. And IT HAS TO BE CALLED IN
- THE MAIN THREAD.
- """
- threadMgr.set_current_thread_as_main()
-
-
threadMgr = ThreadManager()
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。