+ 2

How to prevent tkinter from freezing

I am working on a chess game. My game works perfectly when i run it on windows console but when i use tkinter, it starts freezing when it generate best move for computer. class chessGame: ... def computerMove(self): ... generateChoice() #This takes about 5-10 sec, program start freezing from here ... I have googled it but i couldn't find any answer for my problem :(

28th Jun 2019, 6:21 AM
LetterC67
LetterC67 - avatar
1 Respuesta
+ 2
i'm not familiar with python or tkinter. but if i take a guess the calculation process is taking place in the main/window handling thread. maybe try to run the calculation in different thread
28th Jun 2019, 7:19 AM
Taste
Taste - avatar