'How can i fix this with threading or multithreading
So in short im making a python game using Tkinter for some GUI, Thats not the problem. when im running the code its freesing for 10 second. tell me how i can fix this using threading.
sorry i cant write a question properly
def timepas():
global time0
global money
global total_money
global Invests
global Invests_money
global stopInvest
global countlocal
while stopInvest:
countlocal = countlocal + 1
Invests_money = Invests * 2
money = money + Invests_money
print(money)
time.sleep(1)
if countlocal == count:
stopInvest = False
continue
def work_money():
global money
money += 1
def BankAcc():
global money
messagebox.showinfo("Your Bank Account", "You have $:" + str(total_money))
def Inves():
global Invests
global money
if money >= 10:
Invests = Invests + 1
money = money - 10
def stop_investing():
global count
global countlocal
global total_money
global money
count = 10
countlocal
total_money = total_money + money
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
