當前位置: 首頁>>代碼示例>>Python>>正文


Python QtCore.QMutex方法代碼示例

本文整理匯總了Python中PyQt5.QtCore.QMutex方法的典型用法代碼示例。如果您正苦於以下問題:Python QtCore.QMutex方法的具體用法?Python QtCore.QMutex怎麽用?Python QtCore.QMutex使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PyQt5.QtCore的用法示例。


在下文中一共展示了QtCore.QMutex方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: from PyQt5 import QtCore [as 別名]
# 或者: from PyQt5.QtCore import QMutex [as 別名]
def __init__(self, mw):
        super(MediaThread, self).__init__(mw)
        self.mw = mw
        self.stopped = False
        self.capture = None
        self.nextFrame = False
        self.mutex = QtCore.QMutex()
        self.mode = None 
開發者ID:xsyann,項目名稱:detection,代碼行數:10,代碼來源:detection.py

示例2: fun_call_signalled

# 需要導入模塊: from PyQt5 import QtCore [as 別名]
# 或者: from PyQt5.QtCore import QMutex [as 別名]
def fun_call_signalled(self, fun_to_call, args, kwargs, mutex):
        """
        Function-event executed in the main thread as a result of emiting signal fun_call_signal from BG threads.
        :param fun_to_call: ref to a function which is to be called
        :param args: args passed to the function fun_to_call
        :param mutex: mutex object (QMutex) which is used in the calling thread to wait until
            function 'fun_to_call' terminates; calling mutex.unlock() will signal that
        :return: return value from fun_to_call
        """
        try:
            self.fun_call_ret_value = fun_to_call(*args, **kwargs)
        except Exception as e:
            self.fun_call_exception = e
        finally:
            mutex.unlock() 
開發者ID:Bertrand256,項目名稱:dash-masternode-tool,代碼行數:17,代碼來源:wnd_utils.py

示例3: __init__

# 需要導入模塊: from PyQt5 import QtCore [as 別名]
# 或者: from PyQt5.QtCore import QMutex [as 別名]
def __init__(self, parent=None):
        super(Evaluate, self).__init__(parent)
        self.mutex = QMutex() 
開發者ID:jjgomera,項目名稱:pychemqt,代碼行數:5,代碼來源:thread.py

示例4: __init__

# 需要導入模塊: from PyQt5 import QtCore [as 別名]
# 或者: from PyQt5.QtCore import QMutex [as 別名]
def __init__(self, parent=None):
        super(FuzzySearchThread, self).__init__(parent)
        self.stopped = False
        self.mutex = QtCore.QMutex()
        self.terminate_event = threading.Event() 
開發者ID:Ga-ryo,項目名稱:IDAFuzzy,代碼行數:7,代碼來源:ida_fuzzy.py

示例5: __init__

# 需要導入模塊: from PyQt5 import QtCore [as 別名]
# 或者: from PyQt5.QtCore import QMutex [as 別名]
def __init__(self, parent=None):
        super(GetSharedInfo, self).__init__(parent)
        self._disk = None
        self.share_url = ""
        self.pwd = ""
        self.is_file = ""
        self.is_folder = ""
        self._mutex = QMutex()
        self._is_work = False
        self._pat = r"(https?://(\w[-\w]*\.)?lanzou[six].com/[bi]?[A-Za-z0-9]+)[^0-9a-z]*([a-z0-9]+)?" 
開發者ID:rachpt,項目名稱:lanzou-gui,代碼行數:12,代碼來源:share.py

示例6: __init__

# 需要導入模塊: from PyQt5 import QtCore [as 別名]
# 或者: from PyQt5.QtCore import QMutex [as 別名]
def __init__(self, parent=None):
        super(CheckUpdateWorker, self).__init__(parent)
        self._ver = ''
        self._manual = False
        self._mutex = QMutex()
        self._is_work = False
        self._folder_id = None
        self._api = 'https://api.github.com/repos/rachpt/lanzou-gui/releases/latest'
        self._api_mirror = 'https://gitee.com/api/v5/repos/rachpt/lanzou-gui/releases/latest' 
開發者ID:rachpt,項目名稱:lanzou-gui,代碼行數:11,代碼來源:update.py

示例7: __init__

# 需要導入模塊: from PyQt5 import QtCore [as 別名]
# 或者: from PyQt5.QtCore import QMutex [as 別名]
def __init__(self, parent=None):
        super(GetRecListsWorker, self).__init__(parent)
        self._disk = None
        self._mutex = QMutex()
        self._is_work = False
        self._folder_id = None 
開發者ID:rachpt,項目名稱:lanzou-gui,代碼行數:8,代碼來源:recovery.py

示例8: __init__

# 需要導入模塊: from PyQt5 import QtCore [as 別名]
# 或者: from PyQt5.QtCore import QMutex [as 別名]
def __init__(self, disk, task, parent=None):
        super(Downloader, self).__init__(parent)
        self._disk = disk
        self._task = task
        self._stopped = True
        self._mutex = QMutex() 
開發者ID:rachpt,項目名稱:lanzou-gui,代碼行數:8,代碼來源:down.py

示例9: __init__

# 需要導入模塊: from PyQt5 import QtCore [as 別名]
# 或者: from PyQt5.QtCore import QMutex [as 別名]
def __init__(self, parent=None):
        super(ListRefresher, self).__init__(parent)
        self._disk = None
        self._fid = -1
        self.r_files = True
        self.r_folders = True
        self.r_path = True
        self._mutex = QMutex()
        self._is_work = False 
開發者ID:rachpt,項目名稱:lanzou-gui,代碼行數:11,代碼來源:refresh.py

示例10: __init__

# 需要導入模塊: from PyQt5 import QtCore [as 別名]
# 或者: from PyQt5.QtCore import QMutex [as 別名]
def __init__(self, parent=None):
        super(SetPwdWorker, self).__init__(parent)
        self._disk = None
        self.infos = []
        self._work_id = -1
        self._mutex = QMutex()
        self._is_work = False 
開發者ID:rachpt,項目名稱:lanzou-gui,代碼行數:9,代碼來源:pwd.py

示例11: __init__

# 需要導入模塊: from PyQt5 import QtCore [as 別名]
# 或者: from PyQt5.QtCore import QMutex [as 別名]
def __init__(self, parent=None):
        super(DescPwdFetcher, self).__init__(parent)
        self._disk = None
        self.infos = None
        self.download = False
        self.dl_path = ""
        self._mutex = QMutex()
        self._is_work = False 
開發者ID:rachpt,項目名稱:lanzou-gui,代碼行數:10,代碼來源:desc.py

示例12: __init__

# 需要導入模塊: from PyQt5 import QtCore [as 別名]
# 或者: from PyQt5.QtCore import QMutex [as 別名]
def __init__(self, parent=None):
        super(RenameMkdirWorker, self).__init__(parent)
        self._disk = None
        self._work_id = -1
        self._folder_list = None
        self.infos = None
        self._mutex = QMutex()
        self._is_work = False 
開發者ID:rachpt,項目名稱:lanzou-gui,代碼行數:10,代碼來源:rename.py

示例13: __init__

# 需要導入模塊: from PyQt5 import QtCore [as 別名]
# 或者: from PyQt5.QtCore import QMutex [as 別名]
def __init__(self, parent=None):
        super(RemoveFilesWorker, self).__init__(parent)
        self._disk = None
        self.infos = None
        self._mutex = QMutex()
        self._is_work = False 
開發者ID:rachpt,項目名稱:lanzou-gui,代碼行數:8,代碼來源:rm.py

示例14: __init__

# 需要導入模塊: from PyQt5 import QtCore [as 別名]
# 或者: from PyQt5.QtCore import QMutex [as 別名]
def __init__(self, parent=None):
        super(GetAllFoldersWorker, self).__init__(parent)
        self._disk = None
        self.org_infos = None
        self._mutex = QMutex()
        self._is_work = False
        self.move_infos = None 
開發者ID:rachpt,項目名稱:lanzou-gui,代碼行數:9,代碼來源:folders.py

示例15: __init__

# 需要導入模塊: from PyQt5 import QtCore [as 別名]
# 或者: from PyQt5.QtCore import QMutex [as 別名]
def __init__(self, parent=None):
        super(LogoutWorker, self).__init__(parent)
        self._disk = None
        self.update_ui = True
        self._mutex = QMutex()
        self._is_work = False 
開發者ID:rachpt,項目名稱:lanzou-gui,代碼行數:8,代碼來源:login.py


注:本文中的PyQt5.QtCore.QMutex方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。