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 MessageStickerType constructor initialization deadlock #670

Merged
merged 1 commit into from
Aug 16, 2022

Conversation

MrPowerGamerBR
Copy link
Contributor

@MrPowerGamerBR MrPowerGamerBR commented Aug 15, 2022

Instead of initializing the set during class load, the set will be created when calling the values list.

Fixes #669

Other Kord classes also handles values lists in the same manner (Image, DiscordChannel, DiscordMessage, etc), so I've decided to keep it in the same way.

However, Lost and Lukellmann pointed out that using by lazy also fixes the issue, and I have tested it and it also does work, so maybe this is something to keep in mind for the future to avoid unnecessary set allocations.

@lukellmann
Copy link
Member

However, Lost and Lukellmann pointed out that using by lazy also fixes the issue, and I have tested it and it also does work, so maybe this is something to keep in mind for the future to avoid unnecessary set allocations.

I already considered this, see here :)

@lukellmann lukellmann merged commit bebfcc7 into kordlib:0.8.x Aug 16, 2022
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.

MessageStickerType Initialization Deadlock
2 participants