diff options
author | dormando <dormando@rydia.net> | 2021-08-09 14:06:49 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2021-08-09 14:06:49 -0700 |
commit | d63db64889952b160036e90bdb1eba024cf33712 (patch) | |
tree | 4e99200e869d0d062bf91a4c24a43724b1878f49 /logger.h | |
parent | 617d7cd64d04698b76fee74882627690017e20ad (diff) | |
download | memcached-d63db64889952b160036e90bdb1eba024cf33712.tar.gz |
logger: avoid polling without watchers
Inspired by #768 - logger thread would wake up once per second looking
for watchers or log entries, but without any watchers. Now sleeps on a
condition.
Note that if I ever actually get logger to syslog/stdout/stderr/etc
working properly this will still always poll.
Diffstat (limited to 'logger.h')
-rw-r--r-- | logger.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -162,6 +162,7 @@ typedef struct { int sfd; /* client fd */ int id; /* id number for watcher list */ uint64_t skipped; /* lines skipped since last successful print */ + uint64_t min_gid; /* don't show log entries older than this GID */ bool failed_flush; /* recently failed to write out (EAGAIN), wait before retry */ enum logger_watcher_type t; /* stderr, client, syslog, etc */ uint16_t eflags; /* flags we are interested in */ |