How to sleep or pause a PThread in c on Linux

后端 未结 2 961
长情又很酷
长情又很酷 2020-12-02 16:05

I am developing an application in which I do multithreading. One of my worker threads displays images on the widget. Another thread plays sound. I want to stop/suspend/pause

2条回答
  •  青春惊慌失措
    2020-12-02 16:39

    You have your threads poll for "messages" from the UI at regular interval. In other words, UI in one thread posts action messages to the worker threads e.g. audio/video.

提交回复
热议问题