mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix #78 st joinable thread must be stop by other threads, 0.9.113
This commit is contained in:
parent
6fba0db9b5
commit
0eb9e0af5b
14 changed files with 96 additions and 16 deletions
|
@ -88,6 +88,7 @@ private:
|
|||
st_thread_t tid;
|
||||
int _cid;
|
||||
bool loop;
|
||||
bool _joinable;
|
||||
private:
|
||||
ISrsThreadHandler* handler;
|
||||
int64_t cycle_interval_us;
|
||||
|
@ -96,8 +97,15 @@ public:
|
|||
* initialize the thread.
|
||||
* @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
|
||||
*/
|
||||
SrsThread(ISrsThreadHandler* thread_handler, int64_t interval_us);
|
||||
/**
|
||||
* 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);
|
||||
virtual ~SrsThread();
|
||||
public:
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue