Coverage Report

Created: 2023-11-12 09:30

/proc/self/cwd/source/common/event/libevent.cc
Line
Count
Source
1
#include "source/common/event/libevent.h"
2
3
#include <csignal>
4
5
#include "source/common/common/assert.h"
6
7
#include "event2/thread.h"
8
9
namespace Envoy {
10
namespace Event {
11
namespace Libevent {
12
13
bool Global::initialized_ = false;
14
15
126
void Global::initialize() {
16
#ifdef WIN32
17
  evthread_use_windows_threads();
18
#else
19
126
  evthread_use_pthreads();
20
21
  // Ignore SIGPIPE and allow errors to propagate through error codes.
22
126
  signal(SIGPIPE, SIG_IGN);
23
126
#endif
24
126
  initialized_ = true;
25
126
}
26
27
} // namespace Libevent
28
} // namespace Event
29
} // namespace Envoy