Skip to content

Implement StateTracker::wait_state() with lock-free wakeup and Implement semaphore using condvar and mutex - #828

Draft
Flw5469 wants to merge 15 commits into
roc-streaming:developfrom
Flw5469:state_tracker_2026_01
Draft

Implement StateTracker::wait_state() with lock-free wakeup and Implement semaphore using condvar and mutex#828
Flw5469 wants to merge 15 commits into
roc-streaming:developfrom
Flw5469:state_tracker_2026_01

Conversation

@Flw5469

@Flw5469 Flw5469 commented Feb 20, 2026

Copy link
Copy Markdown

Follow-up PR of my previous PR #749
Implement StateTracker::wait_state() with lock-free wakeup and Implement a semaphore using condvar and mutex

Detail:

  1. Make the Waiting Threads waiting using condition variables
  2. Add compile time check in SConstruct for whether sem_clockedwait exists
  3. Add fall-back semaphore using cond var and mutex for platforms without sem_clockedwait (reason explained here Add StateTracker::wait_state() and converted linux semaphore timed wait into monotonic clock domain  #814 (comment))
  4. Add test cases of state_tracker's timeout and blocking.
  5. Add test cases of semaphore

@rocstreaming-bot rocstreaming-bot added contrib PR not by a maintainer S-needs-rebase status: PR has conflicts and should be rebased labels Feb 20, 2026
@rocstreaming-bot

Copy link
Copy Markdown

🤖 Pull request is currently unmergeable due to conflicts.
Please rebase on up-to-date upstream branch, resolve merge conflicts, and force-push to pull request's branch. Remember to use rebase with force-push instead of a regular merge.

flw5469 added 2 commits February 20, 2026 16:53
…cond var in platform without sem_clockwait() to prevent semaphore:timed_wait() to hang when changing sysem time, add test cases for state tracker and semaphore
@Flw5469
Flw5469 force-pushed the state_tracker_2026_01 branch from a2d0fed to cc259c0 Compare February 20, 2026 08:55
@rocstreaming-bot rocstreaming-bot removed the S-needs-rebase status: PR has conflicts and should be rebased label Feb 20, 2026
@rocstreaming-bot

Copy link
Copy Markdown

🤖 Pull request has failed checks and was automatically marked as work-in-progress.
If you believe the failures are unrelated or you want an early review, click on the request review button. Otherwise, please fix failures before requesting review.

@rocstreaming-bot rocstreaming-bot added the S-work-in-progress status: PR is still in progress and changing label Feb 20, 2026
@baranovmv

baranovmv commented Sep 4, 2026

Copy link
Copy Markdown
Member

@Flw5469 don't you mind if I move this pr forward myself? You've made a huge progess, there are very few things left before we can merge it

@baranovmv
baranovmv marked this pull request as draft September 4, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contrib PR not by a maintainer S-work-in-progress status: PR is still in progress and changing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants