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

Refine comments.

This commit is contained in:
winlin 2024-09-09 11:17:30 +08:00
parent 79161b91f0
commit 2e7f2c2d78

View file

@ -342,6 +342,12 @@ SrsWaitGroup::SrsWaitGroup()
SrsWaitGroup::~SrsWaitGroup()
{
// In the destructor, we should NOT wait for all coroutines to be done, because user should decide
// to wait or not. Similar to the Go's sync.WaitGroup, it also requires user to wait explicitly. For
// some special use scenarios, such as error handling, for example, if we started three servers with
// wait group, and one of them failed, user may want to return error and quit directly, without wait
// for other running servers to be done. If we wait in the destructor, it will continue to run without
// some servers, in unknown behaviors.
srs_cond_destroy(done_);
}