Remove random sleep interval from acquire_lock
The function caused problems with tests and the random sleep is truly not needed (legacy code and it doesn't bring any visible benefits).
This commit is contained in:
parent
00ca809963
commit
3bba88408c
@ -29,7 +29,6 @@
|
||||
#include <sys/time.h>
|
||||
#include "maxscale/skygw_utils.h"
|
||||
#include <maxscale/atomic.h>
|
||||
#include <maxscale/random_jkiss.h>
|
||||
#include <pcre2.h>
|
||||
|
||||
#if !defined(PATH_MAX)
|
||||
@ -467,7 +466,7 @@ void acquire_lock(int* l)
|
||||
misscount += 1;
|
||||
if (misscount > 10)
|
||||
{
|
||||
ts1.tv_nsec = (random_jkiss() % misscount) * 1000000;
|
||||
ts1.tv_nsec = misscount * 1000000;
|
||||
nanosleep(&ts1, NULL);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user