Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
cd9ff9d9
Commit
cd9ff9d9
authored
Oct 08, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
event/TimerEvent: use base_hook instead of member_hook
parent
4cd0f661
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
Loop.hxx
src/event/Loop.hxx
+1
-3
TimerEvent.hxx
src/event/TimerEvent.hxx
+4
-5
No files found.
src/event/Loop.hxx
View file @
cd9ff9d9
...
...
@@ -66,9 +66,7 @@ class EventLoop final : SocketMonitor
using
TimerSet
=
boost
::
intrusive
::
multiset
<
TimerEvent
,
boost
::
intrusive
::
member_hook
<
TimerEvent
,
TimerEvent
::
TimerSetHook
,
&
TimerEvent
::
timer_set_hook
>
,
boost
::
intrusive
::
base_hook
<
boost
::
intrusive
::
set_base_hook
<>>
,
boost
::
intrusive
::
compare
<
TimerCompare
>
,
boost
::
intrusive
::
constant_time_size
<
false
>>
;
TimerSet
timers
;
...
...
src/event/TimerEvent.hxx
View file @
cd9ff9d9
...
...
@@ -36,12 +36,11 @@ class EventLoop;
* thread that runs the #EventLoop, except where explicitly documented
* as thread-safe.
*/
class
TimerEvent
final
{
class
TimerEvent
final
:
public
boost
::
intrusive
::
set_base_hook
<>
{
friend
class
EventLoop
;
typedef
boost
::
intrusive
::
set_member_hook
<>
TimerSetHook
;
TimerSetHook
timer_set_hook
;
EventLoop
&
loop
;
typedef
BoundMethod
<
void
()
noexcept
>
Callback
;
...
...
@@ -67,7 +66,7 @@ public:
}
bool
IsActive
()
const
noexcept
{
return
timer_set_hook
.
is_linked
();
return
is_linked
();
}
void
Schedule
(
std
::
chrono
::
steady_clock
::
duration
d
)
noexcept
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment