How to efficiently do many tasks a “little later” in Python?

后端 未结 10 898
心在旅途
心在旅途 2021-01-30 11:59

I have a process, that needs to perform a bunch of actions \"later\" (after 10-60 seconds usually). The problem is that those \"later\" actions can be a lot (1000s), so using a

10条回答
  •  一生所求
    2021-01-30 12:04

    Simple. You can inherit your class from Thread and create instance of your class with Param like timeout so for each instance of your class you can say timeout that will make your thread wait for that time

提交回复
热议问题