Long running process - how to speed up?

Robert Latest boblatest at yahoo.com
Wed Feb 23 16:07:42 EST 2022


Shaozhong SHI wrote:
> Can it be divided into several processes?

I'd do it like this:

from time import sleep
from threading import Thread

t = Thread(target=lambda: sleep(1))
t.run()

# do your work here

t.wait()



More information about the Python-list mailing list