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
91de5421
Commit
91de5421
authored
Sep 14, 2011
by
antirez
Browse files
Better comments for bioWaitPendingJobsLE
parent
fde4e4c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bio.c
View file @
91de5421
...
@@ -140,7 +140,15 @@ unsigned long long bioPendingJobsOfType(int type) {
...
@@ -140,7 +140,15 @@ unsigned long long bioPendingJobsOfType(int type) {
* less or equal to the specified number.
* less or equal to the specified number.
*
*
* This function may block for long time, it should only be used to perform
* This function may block for long time, it should only be used to perform
* special tasks like AOF rewriting or alike. */
* the following tasks:
*
* 1) To avoid that the main thread is pushing jobs of a given time so fast
* that the background thread can't process them at the same speed.
* So before creating a new job of a given type the main thread should
* call something like: bioWaitPendingJobsLE(job_type,10000);
* 2) In order to perform special operations that make it necessary to be sure
* no one is touching shared resourced in the background.
*/
void
bioWaitPendingJobsLE
(
int
type
,
unsigned
long
long
num
)
{
void
bioWaitPendingJobsLE
(
int
type
,
unsigned
long
long
num
)
{
unsigned
long
long
iteration
=
0
;
unsigned
long
long
iteration
=
0
;
...
...
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