Coverage Report

Created: 2024-09-19 09:45

/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
132
void Global::initialize() {
16
#ifdef WIN32
17
  evthread_use_windows_threads();
18
#else
19
132
  evthread_use_pthreads();
20
21
  // Ignore SIGPIPE and allow errors to propagate through error codes.
22
132
  signal(SIGPIPE, SIG_IGN);
23
132
#endif
24
132
  initialized_ = true;
25
132
}
26
27
} // namespace Libevent
28
} // namespace Event
29
} // namespace Envoy