本文整理匯總了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
示例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()
示例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()
示例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()
示例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]+)?"
示例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'
示例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
示例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()
示例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
示例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
示例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
示例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
示例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
示例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
示例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