linux pthread_suspend

后端 未结 5 2018
醉酒成梦
醉酒成梦 2021-02-08 03:36

Looks like linux doesnt implement pthread_suspend and continue, but I really need em.

I have tried cond_wait, but it is too slow. The work being threaded mostly execut

5条回答
  •  天涯浪人
    2021-02-08 03:51

    Why do you care which thread does the work? It sounds like you designed yourself into a corner and now you need a trick to get yourself out of it. If you let whatever thread happened to already be running do the work, you wouldn't need this trick, and you would need fewer context switches as well.

提交回复
热议问题