def a1(request): if request.method == "POST": add = request.POST['addition'] while True: add = add + 1 print(add) time.sleep(2) return render(request, blog/finished.html) def a2(request): if request.method == "POST": check = request.POST['checking'] while True: print(check) print("second function: ",check) time.sleep(2) return render(request, blog/finished.html)
Quote:I have called the first "a1" function and it's starts running in the loop and when I called the second "a2" function, the first "a1" function supposed to stop and second function has to start running, but the two functions are running parallelly. I need to stop the first function when the second function is called. Please help
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)