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:
parent
efea38c51a
commit
3d0dcb2a17
3 changed files with 14 additions and 0 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue