libzypp: zypp-core/ng/thread/wakeup.h Source File

libzypp 17.38.6

wakeup.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8----------------------------------------------------------------------*/
9#ifndef ZYPP_NG_THREAD_WAKEUP_H_INCLUDED
10#define ZYPP_NG_THREAD_WAKEUP_H_INCLUDED
11
12#include <memory>
13
14namespace zyppng {
15
16 class SocketNotifier;
17
22 class Wakeup
23 {
24 public:
25 Wakeup();
26 ~Wakeup();
27
31 void notify();
32
37 void ack();
38
42 int pollfd() const;
43
48 std::shared_ptr<SocketNotifier> makeNotifier( const bool enabled = true ) const;
49
50 private:
51 int _wakeupPipe[2] = { -1, -1 };
52 };
53
54}
55
56
57
58#endif // ZYPP_NG_THREAD_WAKEUP_H_INCLUDED
zyppng::SocketNotifier
Definition socketnotifier.h:69
zyppng::Wakeup::Wakeup
Wakeup()
Definition wakeup.cpp:11
zyppng::Wakeup::makeNotifier
std::shared_ptr< SocketNotifier > makeNotifier(const bool enabled=true) const
Definition wakeup.cpp:39
zyppng::Wakeup::notify
void notify()
Definition wakeup.cpp:23
zyppng::Wakeup::pollfd
int pollfd() const
Definition wakeup.cpp:34
zyppng::Wakeup::_wakeupPipe
int _wakeupPipe[2]
Definition wakeup.h:51
zyppng::Wakeup::ack
void ack()
Definition wakeup.cpp:28
zyppng::Wakeup::~Wakeup
~Wakeup()
Definition wakeup.cpp:17
zyppng
Definition MediaNetworkRequestExecutor.h:16