Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-file
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-file
Commits
a585e9b0
Commit
a585e9b0
authored
Sep 21, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Go back to the sleep interval in the constructor.
There was much more busy-wait looping than I expected.
parent
42ee1d06
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
vmod_file.c
src/vmod_file.c
+4
-5
No files found.
src/vmod_file.c
View file @
a585e9b0
...
...
@@ -43,6 +43,7 @@
#include "cache/cache.h"
#include "vcl.h"
#include "vtim.h"
#include "vcc_if.h"
...
...
@@ -53,6 +54,7 @@
snprintf((rdr)->errbuf, (rdr)->errlen, "vmod file failure: " fmt, \
__VA_ARGS__)
#define INIT_SLEEP_INTERVAL 0.001
#define ERRMSG_LEN 128
#define NO_ERR ("No error")
...
...
@@ -196,7 +198,6 @@ vmod_reader__init(VRT_CTX, struct VPFX(file_reader) **rdrp,
struct
sigevent
sigev
;
timer_t
timerid
;
struct
itimerspec
timerspec
;
int
flags
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
AN
(
rdrp
);
...
...
@@ -287,10 +288,8 @@ vmod_reader__init(VRT_CTX, struct VPFX(file_reader) **rdrp,
AZ
(
rdr
->
info
->
mtime
.
tv_nsec
);
AZ
(
rdr
->
flags
&
(
RDR_INITIALIZED
|
RDR_ERROR
));
do
{
AZ
(
pthread_rwlock_wrlock
(
&
rdr
->
lock
));
flags
=
rdr
->
flags
;
AZ
(
pthread_rwlock_unlock
(
&
rdr
->
lock
));
}
while
((
flags
&
(
RDR_INITIALIZED
|
RDR_ERROR
))
==
0
);
VTIM_sleep
(
INIT_SLEEP_INTERVAL
);
}
while
((
rdr
->
flags
&
(
RDR_INITIALIZED
|
RDR_ERROR
))
==
0
);
if
(
rdr
->
flags
&
RDR_ERROR
)
{
AN
(
strcmp
(
rdr
->
errbuf
,
NO_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