Can you explain 'how-to-implement-multicore-processing-in-python-3-and-pyqt5' ? For example, I'd like to instantiate a GUI (PyQt ) Widget, and pass it a pipe. I understand multiprocessing must pickle things in order to sling them among processes, and bound methods are not picklabe. If the multiprocessing target is a method associated with a (GUI?) object, it has to send the object state to the new process but fails to pickle it because a PyQt GUI object is far too complex to pickle. import multiprocessing.dummy as mp For example, if you have a class, class MyGui (QtWidgets.QMainWindow ): def __init__(self, rx_pipe, tx_pipe, *args, **kwargs): then instantiating, and trying to make a process out of one of its functions doesn't work (isn't pickable): mgrc = MyGui ( tx_pipe , rx_pipe) procGuiFunc = multiprocessing.Process(target=mgrc.run) Similarly... this class class MyGuiMp (QtWidgets.QMainWindow , multiprocessing.Process): def __init__(self, rx_pipe, tx_pipe, *args, **kwargs): also instantiates from multiprocessing, but still doesn't work (isn't pickable): mgrc = MyGuiMp ( tx_pipe , rx_pipe) mgrc.start() # Will calls our class' overridden 'run' How can you spawn a (GUI) object's function to multi-processing??
hdir kawan'"
Can you explain 'how-to-implement-multicore-processing-in-python-3-and-pyqt5' ?
For example, I'd like to instantiate a GUI (PyQt ) Widget, and pass it a pipe. I understand multiprocessing must pickle things in order to sling them among processes, and bound methods are not picklabe. If the multiprocessing target is a method associated with a (GUI?) object, it has to send the object state to the new process but fails to pickle it because a PyQt GUI object is far too complex to pickle.
import multiprocessing.dummy as mp
For example, if you have a class,
class MyGui (QtWidgets.QMainWindow ):
def __init__(self, rx_pipe, tx_pipe, *args, **kwargs):
then instantiating, and trying to make a process out of one of its functions doesn't work (isn't pickable):
mgrc = MyGui ( tx_pipe , rx_pipe)
procGuiFunc = multiprocessing.Process(target=mgrc.run)
Similarly... this class
class MyGuiMp (QtWidgets.QMainWindow , multiprocessing.Process):
def __init__(self, rx_pipe, tx_pipe, *args, **kwargs):
also instantiates from multiprocessing, but still doesn't work (isn't pickable):
mgrc = MyGuiMp ( tx_pipe , rx_pipe)
mgrc.start() # Will calls our class' overridden 'run'
How can you spawn a (GUI) object's function to multi-processing??
I have a taxi company and I would like to have an android and iPhone app , could you help me make it for our company
For sure. It will cost you one hundred bazillion trillion gigamillion dollars though.