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

Race-condition between dockutil screen update and next command #43

Closed
JBarrskog opened this issue May 4, 2022 · 1 comment · Fixed by #50
Closed

Race-condition between dockutil screen update and next command #43

JBarrskog opened this issue May 4, 2022 · 1 comment · Fixed by #50

Comments

@JBarrskog
Copy link

JBarrskog commented May 4, 2022

The screen of my 16" M1 MacBook Pro flashes and reloads(?) the dock every time a change is made to the dock. This results in a race-condition, resulting in me having to run the dock-module several times until all changes to the dock are made.

Suggestion:
Add a 1 second delay after each alteration to the dock, to give time for the reloading.

EDIT:
The role could perhaps run recursively until no changes are made.

@JBarrskog JBarrskog changed the title Race-condition between dockutil screen update and next command Race-condition between dockutil screen update and next command May 4, 2022
@geerlingguy
Copy link
Owner

Merged the dock command pause-between-changes PR above—it's not the prettiest thing in the world, but at least it should work better (especially if the Mac is burdened with some other stuff).

It's annoying if you have like 20+ Dock items, because that's a minimum of 2+ minutes... but at least it'll run through all the way. Another idea is to add retry functionality. That could allow it to run as fast as possible and just loop on the stuck command until all else fails.

I'll add a separate issue to explore that: #53

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 a pull request may close this issue.

2 participants