本文整理汇总了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