How to pause Thread execution

前端 未结 5 1225
耶瑟儿~
耶瑟儿~ 2021-01-03 09:09

How to pause execution of some Thread. I have Thread t and I have two buttons, PAUSE and CONTINUE. On pause I need to pause thread execution and on continue to thread start

5条回答
  •  攒了一身酷
    2021-01-03 09:41

    There is a wait and await that you can call. Await sounds closer to what you are looking for. Why do you need to pause the execution of some thread? If it for something other than homework there may be other solutions.

提交回复
热议问题