RuntimeError: can't start new thread
(Python) For some reason multiprocessing is unable to create a new thread, and my project won't work because of it. It was just working a few minutes ago, and none of the code has been changed.
(The Scratch code is correct, but you can see it anyway: https://turbowarp.org/511063803/editor . The project won't work in turbowarp because it's database is separate from scratch, but the scratch project is unshared.)
I have it waiting for a confirmation from the Scratch project. But if someone exits the project before this finishes, it'll wait forever. So I want it to reset the loop if nothing happens. I now how to do this (I think) so... yeah
NEVERMIND.If I have something like this:
import time, multiprocessing def TimeCheck(): while True: Δt=time.time()-begin_time if Δt>60: #have error in while True loop so it restarts else: time.sleep(1) while True: try: begin_time=timer.time() timer=multiprocessing.Process(target=TimeCheck()) timer.start() #do stuff timer.terminate() except: print('Error')
What can I do to have that error?