1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Windows: Support run in single thread mode.

This commit is contained in:
winlin 2022-11-19 12:11:03 +08:00
parent efea38c51a
commit 3d0dcb2a17
3 changed files with 14 additions and 0 deletions

View file

@ -475,6 +475,10 @@ srs_error_t run_directly_or_daemon()
srs_error_t run_hybrid_server(void* arg);
srs_error_t run_in_thread_pool()
{
#ifdef SRS_SINGLE_THREAD
srs_trace("Run in single thread mode");
return run_hybrid_server(NULL);
#else
srs_error_t err = srs_success;
// Initialize the thread pool.
@ -490,6 +494,7 @@ srs_error_t run_in_thread_pool()
srs_trace("Pool: Start threads primordial=1, hybrids=1 ok");
return _srs_thread_pool->run();
#endif
}
#include <srs_app_tencentcloud.hpp>