mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Log: Change cid from int to string
This commit is contained in:
parent
bca4ec1da1
commit
8a0c2e01f8
42 changed files with 301 additions and 307 deletions
|
@ -80,7 +80,7 @@ public:
|
|||
// @return a copy of error, which should be freed by user.
|
||||
// NULL if not terminated and user should pull again.
|
||||
virtual srs_error_t pull() = 0;
|
||||
virtual int cid() = 0;
|
||||
virtual std::string cid() = 0;
|
||||
};
|
||||
|
||||
// An empty coroutine, user can default to this object before create any real coroutine.
|
||||
|
@ -95,7 +95,7 @@ public:
|
|||
virtual void stop();
|
||||
virtual void interrupt();
|
||||
virtual srs_error_t pull();
|
||||
virtual int cid();
|
||||
virtual std::string cid();
|
||||
};
|
||||
|
||||
// For utest to mock the thread create.
|
||||
|
@ -121,7 +121,7 @@ private:
|
|||
ISrsCoroutineHandler* handler;
|
||||
private:
|
||||
srs_thread_t trd;
|
||||
int context;
|
||||
std::string context;
|
||||
srs_error_t trd_err;
|
||||
private:
|
||||
bool started;
|
||||
|
@ -132,7 +132,7 @@ private:
|
|||
public:
|
||||
// Create a thread with name n and handler h.
|
||||
// @remark User can specify a cid for thread to use, or we will allocate a new one.
|
||||
SrsSTCoroutine(std::string n, ISrsCoroutineHandler* h, int cid = 0);
|
||||
SrsSTCoroutine(std::string n, ISrsCoroutineHandler* h, std::string cid = "");
|
||||
virtual ~SrsSTCoroutine();
|
||||
public:
|
||||
// Start the thread.
|
||||
|
@ -154,7 +154,7 @@ public:
|
|||
// @remark Return ERROR_THREAD_INTERRUPED when thread is interrupted.
|
||||
virtual srs_error_t pull();
|
||||
// Get the context id of thread.
|
||||
virtual int cid();
|
||||
virtual std::string cid();
|
||||
private:
|
||||
virtual srs_error_t cycle();
|
||||
static void* pfn(void* arg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue