Thread-safe publish with StackExchange.Redis

北城余情 提交于 2021-02-10 14:53:59

问题


Can I share one instance of ISubscriber for publishing messages into the same or different channels from different threads?

This is not documented.

Thanks.


回答1:


Yes. All the key APIs in SE.Redis (the IDatabase, IServer, ISubscriber implementations) are fully thread-safe, with the expectation that they will be potentially shared and hammered from multiple threads.



来源:https://stackoverflow.com/questions/52828799/thread-safe-publish-with-stackexchange-redis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!