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
redis
Commits
34460dd6
Commit
34460dd6
authored
Mar 30, 2015
by
antirez
Browse files
Check bio.c job type at thread startup.
Another one just to avoid a warning. Slightly more defensive code anyway.
parent
221d2932
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bio.c
View file @
34460dd6
...
...
@@ -142,6 +142,13 @@ void *bioProcessBackgroundJobs(void *arg) {
unsigned
long
type
=
(
unsigned
long
)
arg
;
sigset_t
sigset
;
/* Check that the type is within the right interval. */
if
(
type
>=
REDIS_BIO_NUM_OPS
)
{
redisLog
(
REDIS_WARNING
,
"Warning: bio thread started with wrong type %lu"
,
type
);
return
NULL
;
}
/* Make the thread killable at any time, so that bioKillThreads()
* can work reliably. */
pthread_setcancelstate
(
PTHREAD_CANCEL_ENABLE
,
NULL
);
...
...
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