Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
b2213b76
Commit
b2213b76
authored
Apr 20, 2016
by
Jan-Erik Rediger
Browse files
docs: Note about thread-safety
parent
92d0e236
Changes
1
Show whitespace changes
Inline
Side-by-side
README.md
View file @
b2213b76
...
@@ -58,6 +58,8 @@ if (c == NULL || c->err) {
...
@@ -58,6 +58,8 @@ if (c == NULL || c->err) {
}
}
```
```
*Note: A `redisContext` is not thread-safe.*
### Sending commands
### Sending commands
There are several ways to issue commands to Redis. The first that will be introduced is
There are several ways to issue commands to Redis. The first that will be introduced is
...
@@ -245,6 +247,9 @@ Redis. It returns a pointer to the newly created `redisAsyncContext` struct. The
...
@@ -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.
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
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.
instantly return if the specified host and port is able to accept a connection.
*Note: A `redisAsyncContext` is not thread-safe.*
```
c
```
c
redisAsyncContext
*
c
=
redisAsyncConnect
(
"127.0.0.1"
,
6379
);
redisAsyncContext
*
c
=
redisAsyncConnect
(
"127.0.0.1"
,
6379
);
if
(
c
->
err
)
{
if
(
c
->
err
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment