Skip to content
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

fix(script): Prevent stalling during shutdown #2621

Merged
merged 1 commit into from Mar 3, 2022

Conversation

patrick96
Copy link
Member

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Other: Replace this with a description of the type of this PR

Description

If a script module is waiting on a non-tailed script to finish, polybar
cannot shut down until the script has terminted.
To remedy this, we use the same polling loop as for tailed scripts which
checks if it needs to terminate after every iteration.

Related Issues & Documents

Documentation (check all applicable)

  • This PR requires changes to the Wiki documentation (describe the changes)
  • This PR requires changes to the documentation inside the git repo (please add them to the PR).
  • Does not require documentation changes

If a script module is waiting on a non-tailed script to finish, polybar
cannot shut down until the script has terminted.
To remedy this, we use the same polling loop as for tailed scripts which
checks if it needs to terminate after every iteration.
@codecov
Copy link

codecov bot commented Mar 3, 2022

Codecov Report

Merging #2621 (bbf606a) into hotfix/3.6.1 (a82e432) will decrease coverage by 0.01%.
The diff coverage is 8.00%.

Impacted file tree graph

@@               Coverage Diff                @@
##           hotfix/3.6.1    #2621      +/-   ##
================================================
- Coverage         11.92%   11.91%   -0.02%     
================================================
  Files               153      153              
  Lines             11301    11313      +12     
================================================
  Hits               1348     1348              
- Misses             9953     9965      +12     
Flag Coverage Δ
unittests 11.91% <8.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/adapters/script_runner.cpp 0.00% <0.00%> (ø)
src/components/bar.cpp 0.00% <0.00%> (ø)
src/utils/units.cpp 96.72% <50.00%> (-3.28%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0b24080...bbf606a. Read the comment docs.

@patrick96 patrick96 merged commit c655ade into polybar:hotfix/3.6.1 Mar 3, 2022
@patrick96 patrick96 deleted the fix/script-hang branch March 3, 2022 22:51
@patrick96 patrick96 mentioned this pull request Mar 5, 2022
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant