Skip to content
Advertisement

Tag: multithreading

What is the use of join() in threading?

I was studying the python threading and came across join(). The author told that if thread is in daemon mode then i need to use join() so that thread can finish itself before main thread terminates. but I have also seen him using t.join() even though t was not daemon example code is this i don’t know what is use

How to use multiprocessing queue in Python?

I’m having much trouble trying to understand just how the multiprocessing queue works on python and how to implement it. Lets say I have two python modules that access data from a shared file, let’s call these two modules a writer and a reader. My plan is to have both the reader and writer put requests into two separate multiprocessing

background function in Python

I’ve got a Python script that sometimes displays images to the user. The images can, at times, be quite large, and they are reused often. Displaying them is not critical, but displaying the message associated with them is. I’ve got a function that downloads the image needed and saves it locally. Right now it’s run inline with the code that

How to get the number of active threads started by specific class?

code looks like below: Is there a way to get the number of threads being active by originating class ? Answer This is a minor modification of Doug Hellman’s multiprocessing ActivePool example code (to use threading). The idea is to have your workers register themselves in a pool, unregister themselves when they finish, using a threading.Lock to coordinate modification of

Advertisement