Skip to content

Commit

Permalink
Squash: For #1708
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Nov 15, 2021
1 parent 440f29b commit 9324291
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ jobs:
release_name: Release ${{ github.ref }}
body: |
${{ github.event.head_commit.message }}
${{ env.SRS_SOURCE_MD5 }} [${{ env.SRS_SOURCE_TAR }}](https://github.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_SOURCE_TAR }})
${{ env.SRS_PACKAGE_MD5 }} [${{ env.SRS_PACKAGE_ZIP }}](https://github.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_PACKAGE_ZIP }})
## Resource
* Source: ${{ env.SRS_SOURCE_MD5 }} [${{ env.SRS_SOURCE_TAR }}](https://github.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_SOURCE_TAR }})
* Binary: ${{ env.SRS_PACKAGE_MD5 }} [${{ env.SRS_PACKAGE_ZIP }}](https://github.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_PACKAGE_ZIP }})
draft: false
prerelease: true
# Upload release source files
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ A big `THANK YOU` also goes to:

## Releases

* 2021-11-15, Release [v4.0.198](https://github.com/ossrs/srs/releases/tag/v4.0.198), 4.0 dev8, v4.0.198, 144010 lines.
* 2021-11-02, Release [v4.0.191](https://github.com/ossrs/srs/releases/tag/v4.0.191), 4.0 dev7, v4.0.191, 143890 lines.
* 2021-10-12, Release [v4.0.177](https://github.com/ossrs/srs/releases/tag/v4.0.177), 4.0 dev6, v4.0.177, 143686 lines.
* 2021-09-05, Release [v4.0.161](https://github.com/ossrs/srs/releases/tag/v4.0.161), 4.0 dev5, v4.0.161, 145865 lines.
Expand Down
2 changes: 2 additions & 0 deletions trunk/doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ The changelog for SRS.

## SRS 4.0 Changelog

* v4.0, 2021-11-15, For [#1708](https://github.com/ossrs/srs/pull/1708): ST: Print log when multiple thread stop one coroutine. (#1708). v4.0.198
* v4.0, 2021-11-14, Merge [#2732](https://github.com/ossrs/srs/pull/2732): WebRTC: Fail to publish RTC automatically for HTML5. (#2732). v4.0.197
* v4.0, 2021-11-13, Merge [#2729](https://github.com/ossrs/srs/pull/2729): RTC: check audio track exist when negotiate (#2729). v4.0.196
* v4.0, 2021-11-09, Merge [#2721](https://github.com/ossrs/srs/pull/2721): Rtc2Rtmp: Use RTP timestamp to identify video frames. v4.0.195
* v4.0, 2021-11-07, Merge [#2711](https://github.com/ossrs/srs/pull/2711): Config: Guess config files by [FHS](https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard). v4.0.194
Expand Down
10 changes: 10 additions & 0 deletions trunk/src/app/srs_app_st.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ SrsFastCoroutine::SrsFastCoroutine(string n, ISrsCoroutineHandler* h)
trd = NULL;
trd_err = srs_success;
started = interrupted = disposed = cycle_done = false;
stopping_ = false;

// 0 use default, default is 64K.
stack_size = 0;
Expand All @@ -138,6 +139,7 @@ SrsFastCoroutine::SrsFastCoroutine(string n, ISrsCoroutineHandler* h, SrsContext
trd = NULL;
trd_err = srs_success;
started = interrupted = disposed = cycle_done = false;
stopping_ = false;

// 0 use default, default is 64K.
stack_size = 0;
Expand Down Expand Up @@ -192,9 +194,14 @@ srs_error_t SrsFastCoroutine::start()
void SrsFastCoroutine::stop()
{
if (disposed) {
if (stopping_) {
srs_error("thread is stopping by %s", stopping_cid_.c_str());
srs_assert(!stopping_);
}
return;
}
disposed = true;
stopping_ = true;

interrupt();

Expand Down Expand Up @@ -225,6 +232,9 @@ void SrsFastCoroutine::stop()
if (trd_err == srs_success && !cycle_done) {
trd_err = srs_error_new(ERROR_THREAD_TERMINATED, "terminated");
}

// Now, we'are stopped.
stopping_ = false;

return;
}
Expand Down
4 changes: 4 additions & 0 deletions trunk/src/app/srs_app_st.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ class SrsFastCoroutine
bool disposed;
// Cycle done, no need to interrupt it.
bool cycle_done;
private:
// Sub state in disposed, we need to wait for thread to quit.
bool stopping_;
SrsContextId stopping_cid_;
public:
SrsFastCoroutine(std::string n, ISrsCoroutineHandler* h);
SrsFastCoroutine(std::string n, ISrsCoroutineHandler* h, SrsContextId cid);
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 @@ -9,6 +9,6 @@

#define VERSION_MAJOR 4
#define VERSION_MINOR 0
#define VERSION_REVISION 196
#define VERSION_REVISION 198

#endif

0 comments on commit 9324291

Please sign in to comment.