Skip to content

Commit

Permalink
docs: Note about thread-safety
Browse files Browse the repository at this point in the history
  • Loading branch information
badboy committed Apr 20, 2016
1 parent 92d0e23 commit b2213b7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,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
Expand Down Expand Up @@ -245,6 +247,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) {
Expand Down

0 comments on commit b2213b7

Please sign in to comment.