mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
Better comments for bioWaitPendingJobsLE
This commit is contained in:
parent
fde4e4c428
commit
91de5421b2
10
src/bio.c
10
src/bio.c
@ -140,7 +140,15 @@ unsigned long long bioPendingJobsOfType(int type) {
|
||||
* less or equal to the specified number.
|
||||
*
|
||||
* 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) {
|
||||
unsigned long long iteration = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user