Is it possible to kill a spinning thread?

前端 未结 9 1568
遥遥无期
遥遥无期 2021-01-20 19:09

I am using ZThreads to illustrate the question but my question applies to PThreads, Boost Threads and other such threading libraries in C++.

class MyClass: p         


        
9条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-20 19:43

    You can with TerminateThread() API, but it is not recommended.

    More details at: http://msdn.microsoft.com/en-us/library/windows/desktop/ms686717(v=vs.85).aspx

提交回复
热议问题