How many threads to create and when?

前端 未结 7 1560
不思量自难忘°
不思量自难忘° 2021-01-02 05:37

I have a networking Linux application which receives RTP streams from multiple destinations, does very simple packet modification and then forwards the streams to the final

7条回答
  •  南笙
    南笙 (楼主)
    2021-01-02 06:35

    I would look into a thread pool for this application.

    http://threadpool.sourceforge.net/

    Allow the thread pool to manage your threads and the queue.

    You can tweak the maximum and minimum number of threads used based on performance profiling later.

提交回复
热议问题