Skip to content

Conversation

@LobbyDivinus
Copy link

This PR basically serves as a solution to #7582 by allowing the user to implement custom pooling mechanic that could for example allow for thread safe use

This PR basically serves as a solution to libgdx#7582 by allowing the user to implement custom pooling mechanic that could for example allow for thread safe use
@Berstanio
Copy link
Contributor

This PR basically serves as a solution to #7582 by allowing the user to implement custom pooling mechanic that could for example allow for thread safe use

Just as a note, you can achieve similar already by calling Pools#set on startup.

@LobbyDivinus
Copy link
Author

True, that can be used to implement a thread safe pool for glyph runs. I don't think it can fix the access to static colorStack for fonts that use formatting though.

@Berstanio
Copy link
Contributor

Berstanio commented Mar 18, 2025

I don't think it can fix the access to static colorStack for fonts that use formatting though.

Thats true. From what I can see, it should be okay to just move the colorStack creation into the method (as it's not called per frame) or pool it. But others might know more about it.

Regarding the thread safe pool, I'm honestly in favor of making the standard libGDX pool thread safe. Having static methods not be thread-safe, especially such universal ones, seems like a big footgun to me.

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.

2 participants