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

Cover more ST Coroutine code

This commit is contained in:
winlin 2019-04-07 15:22:09 +08:00
parent 1ce040cc2c
commit 7037f6a197
3 changed files with 37 additions and 12 deletions

View file

@ -106,6 +106,10 @@ public:
virtual int cid();
};
// For utest to mock the thread create.
typedef void* (*_ST_THREAD_CREATE_PFN)(void *(*start)(void *arg), void *arg, int joinable, int stack_size);
extern _ST_THREAD_CREATE_PFN _pfn_st_thread_create;
/**
* A ST-coroutine is a lightweight thread, just like the goroutine.
* But the goroutine maybe run on different thread, while ST-coroutine only