mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine the thread to three category.
This commit is contained in:
parent
2f0ef87d6d
commit
e5f449ce36
25 changed files with 648 additions and 416 deletions
|
@ -57,10 +57,10 @@ public:
|
|||
* when worker call with the task, the worker will do it in isolate thread.
|
||||
* that is, the task is execute/call in async mode.
|
||||
*/
|
||||
class SrsAsyncCallWorker : public ISrsThreadHandler
|
||||
class SrsAsyncCallWorker : public ISrsReusableThreadHandler
|
||||
{
|
||||
private:
|
||||
SrsThread* pthread;
|
||||
SrsReusableThread* pthread;
|
||||
std::vector<ISrsAsyncCallTask*> tasks;
|
||||
public:
|
||||
SrsAsyncCallWorker();
|
||||
|
@ -70,6 +70,8 @@ public:
|
|||
public:
|
||||
virtual int start();
|
||||
virtual void stop();
|
||||
// interface ISrsReusableThreadHandler
|
||||
public:
|
||||
virtual int cycle();
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue