-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent SDL_WaitEvent loop from running before wlserver has finished initializing #1078
Conversation
6a1e5af
to
538fc83
Compare
You don't need to use the semaphore + condition variable, etc -- you can just use a |
I was originally thinking of using atomic wait, but I realized that atomic wait is actually only in c++20 and up. Plus I don’t think gcc will compile with c++20 support by default (correct me if I am wrong on that). |
Gamescope already requires C++20 |
Ah i see, ok I will revise this PR to use atomic + atomic wait instead of the ‘semaphore’ |
c3aa2f7
to
4cd1c10
Compare
Ok, I've now rewritten the PR to just use |
553fc35
to
64aedf9
Compare
30b3e9a
to
a3bda5f
Compare
a91ea0e
to
a9914cf
Compare
9d81a47
to
7e2bc21
Compare
@Joshua-Ashton Could you please re-review this PR? |
…initializing fixes issue ValveSoftware#661
7e2bc21
to
d2b8fa0
Compare
Superseded by commit be20af6 in upstream gamescope |
(hopefully) fixes issue #661
Uses
C++11 compatibleatomicand conditionvariable(reusing the steamcompmgr "poor man's semaphore" class)This PR only adds synchronization during startup, so not much overhead IMO
I had noticed that issue #661 would be triggered 50% of the time when running ValveSoftware/gamescope/master under intel VTune.
Compiling and running gamescope w/ this PR under intel VTune -> haven't seen any occurrences of the issue after running gamescope under VTune 4 different times.