mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Squash: Fix bugs
This commit is contained in:
parent
10d188faab
commit
716e578a19
382 changed files with 170096 additions and 220 deletions
|
@ -189,5 +189,23 @@ private:
|
|||
static void* pfn(void* arg);
|
||||
};
|
||||
|
||||
// Like goroytine sync.WaitGroup.
|
||||
class SrsWaitGroup
|
||||
{
|
||||
private:
|
||||
int nn_;
|
||||
srs_cond_t done_;
|
||||
public:
|
||||
SrsWaitGroup();
|
||||
virtual ~SrsWaitGroup();
|
||||
public:
|
||||
// When start for n coroutines.
|
||||
void add(int n);
|
||||
// When coroutine is done.
|
||||
void done();
|
||||
// Wait for all corotine to be done.
|
||||
void wait();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue