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

Several Data Race issues with State #731

Open
bwmarrin opened this issue Jan 24, 2020 · 1 comment
Open

Several Data Race issues with State #731

bwmarrin opened this issue Jan 24, 2020 · 1 comment

Comments

@bwmarrin
Copy link
Owner

bwmarrin commented Jan 24, 2020

Currently MemberAdd, GuildAdd, ChannelAdd, PresenceUpdate methods update objects inflight. This is a problem because end users could also have a pointer to one of these objects and be reading or writing to them at the same time. These methods should create new updated objects and then replace them.

Also, allowing access to embedded Ready object allows for Data Races as well. We can't just remove it though as I'm sure lots of people are using it.

@bwmarrin
Copy link
Owner Author

See, #645, and 42wim/matterbridge#815.

@bwmarrin bwmarrin mentioned this issue Jan 24, 2020
@bwmarrin bwmarrin changed the title State Data Race with MemberAdd, GuildAdd, ChannelAdd, Ready struct Several Data Race issues with State Jan 24, 2020
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

No branches or pull requests

1 participant