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

Redis#queue is not thread safe #878

Closed
ioquatix opened this issue Oct 28, 2019 · 1 comment
Closed

Redis#queue is not thread safe #878

ioquatix opened this issue Oct 28, 2019 · 1 comment

Comments

@ioquatix
Copy link
Contributor

@ioquatix ioquatix commented Oct 28, 2019

https://github.com/redis/redis-rb/blob/master/lib/redis.rb#L96-L123

Redis#queue is not thread safe because you cannot assume it's safe to read from a hash table when it's also being modified.

Additionally, the hash uses a default constructor which means Redis#queue may actually modify the hash table.

So there are a number of issues with the implementation.

ioquatix added a commit to ioquatix/redis-rb that referenced this issue Oct 28, 2019
Potential fix for redis#878.
@byroot
Copy link
Member

@byroot byroot commented Oct 28, 2019

Thanks

@byroot byroot closed this Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.