问题
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