mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
ST: Support thread-local for multiple threads.
1. All statick and global variables is thread-local. 2. Call st_init() to init st for each thread. 3. Notice that ST is isolate for threads.
This commit is contained in:
parent
d117145b95
commit
339d3b31cc
8 changed files with 61 additions and 54 deletions
6
trunk/3rdparty/st-srs/sync.c
vendored
6
trunk/3rdparty/st-srs/sync.c
vendored
|
@ -47,9 +47,9 @@
|
|||
#include "common.h"
|
||||
|
||||
|
||||
extern time_t _st_curr_time;
|
||||
extern st_utime_t _st_last_tset;
|
||||
extern int _st_active_count;
|
||||
extern __thread time_t _st_curr_time;
|
||||
extern __thread st_utime_t _st_last_tset;
|
||||
extern __thread int _st_active_count;
|
||||
|
||||
static st_utime_t (*_st_utime)(void) = NULL;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue