Created
May 19, 2020 12:29
-
-
Save tameem92/2666846e7ca37457ea04b72c5235b48b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Many Qt functions are not threadsafe. If you use function callback, | |
even if you put locks around all of YOUR draw calls, you will segfault | |
because Qt's main event loop is still running and using | |
resources without locks. | |
""" | |
from multiprocessing.pool import ThreadPool | |
import sys | |
from threading import Lock | |
import time | |
from PyQt5 import QtCore, QtWidgets | |
class Task(QtCore.QObject): | |
updated = QtCore.pyqtSignal(int, int) | |
............... | |
............... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment