mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
for bug #237, add name for thread. 2.0.47
This commit is contained in:
parent
c083238760
commit
c457364321
9 changed files with 30 additions and 26 deletions
|
@ -88,23 +88,26 @@ private:
|
|||
bool loop;
|
||||
bool can_run;
|
||||
bool _joinable;
|
||||
const char* _name;
|
||||
private:
|
||||
ISrsThreadHandler* handler;
|
||||
int64_t cycle_interval_us;
|
||||
public:
|
||||
/**
|
||||
* initialize the thread.
|
||||
* @param name, human readable name for st debug.
|
||||
* @param thread_handler, the cycle handler for the thread.
|
||||
* @param interval_us, the sleep interval when cycle finished.
|
||||
* @param joinable, if joinable, other thread must stop the thread.
|
||||
* @remark if joinable, thread never quit itself, or memory leak.
|
||||
* @see: https://github.com/winlinvip/simple-rtmp-server/issues/78
|
||||
* @remark about st debug, see st-1.9/README, _st_iterate_threads_flag
|
||||
*/
|
||||
/**
|
||||
* TODO: FIXME: maybe all thread must be reap by others threads,
|
||||
* @see: https://github.com/winlinvip/simple-rtmp-server/issues/77
|
||||
*/
|
||||
SrsThread(ISrsThreadHandler* thread_handler, int64_t interval_us, bool joinable);
|
||||
SrsThread(const char* name, ISrsThreadHandler* thread_handler, int64_t interval_us, bool joinable);
|
||||
virtual ~SrsThread();
|
||||
public:
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue