perform multi-threading on a python program

Thread is not being called correctly. You are calling root.mainloop() and passing its return value to the threads as target, requiring it to run to completion in order to return. Instead, pass the function object itself as target by removing the parentheses. The second thread has the same issue, but needs to pass arguments as a separate args tuple.

Use this:

threading.Thread(target=root.mainloop).start() # start the tkinter interface
threading.Thread(target=startndstop,args=("start",)).start() # start the minecraft server 

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top