Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F10615017
eventloop.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
870 B
Subscribers
None
eventloop.h
View Options
// Copyright (c) 2020 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_EVENTLOOP_H
#define BITCOIN_EVENTLOOP_H
#include
<sync.h>
#include
<atomic>
#include
<chrono>
#include
<condition_variable>
#include
<functional>
class
CScheduler
;
struct
EventLoop
{
public
:
EventLoop
()
{}
~
EventLoop
();
bool
startEventLoop
(
CScheduler
&
scheduler
,
std
::
function
<
void
()
>
runEventLoop
,
std
::
chrono
::
milliseconds
delta
);
bool
stopEventLoop
();
private
:
/**
* Start stop machinery.
*/
std
::
atomic
<
bool
>
stopRequest
{
false
};
bool
running
GUARDED_BY
(
cs_running
)
=
false
;
Mutex
cs_running
;
std
::
condition_variable
cond_running
;
};
#endif
// BITCOIN_EVENTLOOP_H
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sat, Nov 23, 09:55 (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4511162
Default Alt Text
eventloop.h (870 B)
Attached To
rSTAGING Bitcoin ABC staging
Event Timeline
Log In to Comment