Skip to content

Commit

Permalink
co/Sleep: to to event/co/
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Dec 3, 2024
1 parent b8eb9a8 commit bddf879
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Each directory below ``src`` contains a sub-library:
- ``adata``: data structures using our pool allocator
- ``co``: C++20 Coroutines
- ``event``: a non-blocking I/O event loop
- ``event/co``: integration of C++20 Coroutines into our event loop
- ``event/net``: non-blocking networking libraries
- ``event/systemd``: non-blocking systemd clients
- ``event/uring``: integration of io_uring in the event loop
Expand Down
2 changes: 1 addition & 1 deletion demo/was/CoSleepMirror.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// author: Max Kellermann <[email protected]>

#include "was/async/CoRun.hxx"
#include "co/Sleep.hxx"
#include "event/co/Sleep.hxx"
#include "event/Loop.hxx"
#include "util/PrintException.hxx"
#include "DefaultFifoBuffer.hxx"
Expand Down
1 change: 1 addition & 0 deletions demo/was/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ if coroutines_dep.found()
include_directories: inc,
dependencies: [
was_server_async_dep,
event_co_dep,
],
)

Expand Down
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ subdir('src/net/log')

if not get_option('fuzzer')
subdir('src/event')
subdir('src/event/co')
subdir('src/event/net')
subdir('src/event/net/control')
subdir('src/event/net/djb')
Expand Down
6 changes: 2 additions & 4 deletions src/co/Sleep.hxx → src/event/co/Sleep.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@

#pragma once

#include "Compat.hxx"
#include "AwaitableHelper.hxx"
#include "co/Compat.hxx"
#include "co/AwaitableHelper.hxx"
#include "event/FineTimerEvent.hxx"

#include <cassert>

namespace Co {

/**
Expand Down
1 change: 1 addition & 0 deletions src/event/co/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
event_co_dep = coroutines_dep
2 changes: 1 addition & 1 deletion test/co/TestCoCache.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "co/Cache.hxx"
#include "co/Task.hxx"
#include "co/InvokeTask.hxx"
#include "co/Sleep.hxx"
#include "event/co/Sleep.hxx"
#include "event/Loop.hxx"

#include <gtest/gtest.h>
Expand Down
2 changes: 1 addition & 1 deletion test/co/TestEagerTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "co/Cache.hxx"
#include "co/Task.hxx"
#include "co/InvokeTask.hxx"
#include "co/Sleep.hxx"
#include "event/co/Sleep.hxx"
#include "event/Loop.hxx"

#include <gtest/gtest.h>
Expand Down
1 change: 1 addition & 0 deletions test/co/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ test(
gtest,
event_dep,
coroutines_dep,
event_co_dep,
],
),
)

0 comments on commit bddf879

Please sign in to comment.