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

Fixed variable synchronization exception caused by the "hyprland/workspace" module #2613

Merged
merged 1 commit into from
Oct 27, 2023
Merged

Conversation

DreamMaoMao
Copy link
Contributor

hey i want to fix:#2607

I've tested this commit several times.

2023-10-27.14-10-40.mp4

…space" module receiving create or delete IPC requests too quickly
@Alexays
Copy link
Owner

Alexays commented Oct 27, 2023

Hi, thanks for the fix!
cc @Syndelis does this look good for you?

Copy link
Contributor

@Syndelis Syndelis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! @Alexays LGTM

@Alexays Alexays merged commit e46f66b into Alexays:master Oct 27, 2023
@zjeffer
Copy link
Contributor

zjeffer commented Nov 6, 2023

I feel like it would be cleaner with some kind of mutex locking solution, no? Then we make sure the vector is not accessed when we update(). I don't really have time to look into that, though.

@DreamMaoMao
Copy link
Contributor Author

I feel like it would be cleaner with some kind of mutex locking solution, no? Then we make sure the vector is not accessed when we update(). I don't really have time to look into that, though.

If the vector is locked during the update, then if the event is triggered at this time, won’t the creation and removal requests be lost?

@DreamMaoMao
Copy link
Contributor Author

To ensure that requests are not lost, the vector used to receive buffering should not be locked from writing at any time. It's like a keyboard's input buffer.

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.

4 participants