Commit 81e8176b authored by not-a-robot's avatar not-a-robot
Browse files

Auto merge of #417 - redis:thread-safety, r=badboy

docs: Note about thread-safety
parents 35a16d6f b2213b76
......@@ -68,6 +68,8 @@ if (c == NULL || c->err) {
}
```
*Note: A `redisContext` is not thread-safe.*
### Sending commands
There are several ways to issue commands to Redis. The first that will be introduced is
......@@ -255,6 +257,9 @@ Redis. It returns a pointer to the newly created `redisAsyncContext` struct. The
should be checked after creation to see if there were errors creating the connection.
Because the connection that will be created is non-blocking, the kernel is not able to
instantly return if the specified host and port is able to accept a connection.
*Note: A `redisAsyncContext` is not thread-safe.*
```c
redisAsyncContext *c = redisAsyncConnect("127.0.0.1", 6379);
if (c->err) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment