Skip to content
Advertisement

Tag: multithreading

How do you differentiate between the process and thread in python?

From what I understand, thread and process differs in that thread shares resources. I am not sure if this differs from one language to another, but how do you differentiate between thread and process in general or in Python? Are every independent functions different process? Would a class methods be threads as they share memory? would recursive functions be thread?

pass function from class without starting it python

I need to run two functions with the threading module you’re able to do this Thread(target=my_func) but i want the function from a class (imported class) so i tried Thread(target=a_class.my_func) but it didn’t worked, then i tried Thread(target=a_class.my_func()) but this one starts to run the function because i called it , and this is an infinite loop so the next

PyQt5: Python crashes with SIGSEGV *sometimes* when sending pixmap via a signal from another thread

Background and Issue I am trying to process streaming data from a camera. Python keeps crashing with this message though: The crash happens sometimes while emitting the signal containing an image. My code, shown below, follows this process: A QObject named CameraThread is instantiated within the GUI and is run by a QThread. CameraThread instantiates a class IngestManager and gives

python service inside thread inside singleton

I have a singleton in which I want to receive data from a service. Since I’m new to python the only way I could figure this out was that a service sends the data up to the singleton via a method pointer. I use the thread to hinder the service to lock the singleton with its infinite loop. The actual

Running functions siultaneoulsy in python

I am making a small program in which I need a few functions to check for something in the background. I used module threading and all those functions indeed run simultaneously and everything works perfectly until I start adding more functions. As the threading module makes new threads, they all stay within the same process, so when I add more,

Advertisement