Skip to content
Advertisement

Tag: multithreading

Timer preventing program from exiting

I’m writing a program which allows me to control a vanilla Minecraft server using python. The first thing I wanted to make is a auto-restart feature. Everything works fine except that I cannot do sys.exit() or similar things, I’m not sure but I think this is because of the Timer. I tried t.cancel() but t is a local variable so

How can I kill a thread with python

I am making a random number guessing game with GUI (Tkinter) and this comes up RuntimeError: threads can only be started once. I’m trying to kill the thread but I can’t find any way. Here’s the code: In the first function (main) is where I call the Thread and in the second function (process) is where I want to kill

How long does it take to create a thread in python

I’m trying to finish my programming course and I’m stuck on one exercise. I have to count how much time it takes in Python to create threads and whether it depends on the number of threads created. I wrote a simple script and I don’t know if it is good: In times[] I got a 10000 results near 0.0 or

python: subprocess returns nothing when running scripts which take longer time

Beginner here with subrpocess problem: The below line works fine when I run both the scripts with less data which takes around 10-20minutes, however with bigger data to be processed the subprocess returns nothing once both the scripts are completed (lets say in an hour). Also: Often with lesser data, it behaves abnormally as well i.e. not returning the status_code/going

Advertisement