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

Avoid redundant locking in CallQueue #76754

Merged
merged 1 commit into from
May 8, 2023

Conversation

RandomShaper
Copy link
Member

As far as I can tell, CallQueue functions are already thread-safe, so the allocator doesn't need to be thread safe in turn.

Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

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

Looks like every function locks with a mutex so indeed this seems unnecessary.

@akien-mga akien-mga merged commit 353efd7 into godotengine:master May 8, 2023
@akien-mga
Copy link
Member

Thanks!

@RandomShaper RandomShaper deleted the mq_less_lock branch May 8, 2023 10:33
@akien-mga
Copy link
Member

This doesn't cherry-pick to 4.0 as CallQueue was added after that release and not backported. If there's another class where this change is indeed in 4.0, it might warrant a dedicated PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants