Skip to content

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(…

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)…

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 …