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

For #906, #902, replace the endless thread with coroutine

This commit is contained in:
winlin 2017-05-29 17:56:26 +08:00
parent fc380fe48d
commit 44f542f77f
7 changed files with 28 additions and 151 deletions

View file

@ -178,7 +178,7 @@ public:
* convert signal to io,
* @see: st-1.9/docs/notes.html
*/
class SrsSignalManager : public ISrsEndlessThreadHandler
class SrsSignalManager : public ISrsCoroutineHandler
{
private:
/* Per-process pipe which is used as a signal queue. */
@ -186,10 +186,10 @@ private:
int sig_pipe[2];
st_netfd_t signal_read_stfd;
private:
SrsServer* _server;
SrsEndlessThread* pthread;
SrsServer* server;
SrsCoroutine* trd;
public:
SrsSignalManager(SrsServer* server);
SrsSignalManager(SrsServer* s);
virtual ~SrsSignalManager();
public:
virtual int initialize();