You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But the implementation https://github.com/redis/redis-py/blob/master/redis/client.py#L1162-L1223 looks like it violates the advice of not passing a PubSub to a thread.
It seems like there's an assumption that you won't do anything else with that pubsub instance here, but I don't see that made explicit anywhere, so I'd call the implementation "technically not thread-safe".
Am I misunderstanding something? Is there something else going on here?
The text was updated successfully, but these errors were encountered:
I'm not sure if this is a bug, documentation oversight, or just a misunderstanding on my part.
Version: Current master at b7f9a4c
Description:
I'm messing around with pubsub, and I'm trying to wrap my head around something here.
https://redis-py.readthedocs.io/en/stable/advanced_features.html#a-note-about-threading
mentions:
Then farther down the page, https://redis-py.readthedocs.io/en/stable/advanced_features.html#publish-subscribe
has an explanation of
pubsub.run_in_thread
(which I'm not intending to do, but I'm looking at what's involved in doing a thread-safeget_message
call).But the implementation https://github.com/redis/redis-py/blob/master/redis/client.py#L1162-L1223 looks like it violates the advice of not passing a PubSub to a thread.
It seems like there's an assumption that you won't do anything else with that pubsub instance here, but I don't see that made explicit anywhere, so I'd call the implementation "technically not thread-safe".
Am I misunderstanding something? Is there something else going on here?
The text was updated successfully, but these errors were encountered: