Skip to content

Commit

Permalink
At least wait 1ms when <1ms, to avoid epoll_wait spin loop. 4.0.66
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Feb 10, 2021
1 parent 5eafcea commit 9ada516
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ For previous versions, please read:

## V4 changes

* v4.0, 2021-02-04, At least wait 1ms when <1ms, to avoid epoll_wait spin loop. 4.0.66
* v4.0, 2021-01-31, Enable -std=c++11 by default. 4.0.65
* v4.0, 2021-01-25, Enable --nasm and --srtp-asm by default for performance. 4.0.64
* v4.0, 2021-01-20, Support HTTP-FLV and HLS for srs-player by H5. 4.0.63
* v4.0, 2021-01-08, HTML5 video tag resolution adaptive. 4.0.59
Expand Down
5 changes: 5 additions & 0 deletions trunk/3rdparty/st-srs/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1210,6 +1210,11 @@ ST_HIDDEN void _st_epoll_dispatch(void)
} else {
min_timeout = (_ST_SLEEPQ->due <= _ST_LAST_CLOCK) ? 0 : (_ST_SLEEPQ->due - _ST_LAST_CLOCK);
timeout = (int) (min_timeout / 1000);

// At least wait 1ms when <1ms, to avoid epoll_wait spin loop.
if (min_timeout > 0 && timeout == 0) {
timeout = 1;
}
}

if (_st_epoll_data->pid != getpid()) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core_version4.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
#ifndef SRS_CORE_VERSION4_HPP
#define SRS_CORE_VERSION4_HPP

#define SRS_VERSION4_REVISION 65
#define SRS_VERSION4_REVISION 66

#endif

0 comments on commit 9ada516

Please sign in to comment.