Skip to content

Commit 7cfacb5

Browse files
committed
Remove ConcurrentChannel
1 parent ebfa1ca commit 7cfacb5

5 files changed

Lines changed: 5 additions & 32 deletions

File tree

.github/workflows/rockylinux8-gcc13.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
xrepo install -y protobuf-cpp
4747
rm -rf example_project
4848
ls -lrt
49-
export PATH=$HOME/.xmake/packages/p/protobuf-cpp/33.1/ef5a1f066f784334984fa37b1443301d/bin:$PATH
49+
export PATH=/root/.xmake/packages/p/protobuf-cpp/33.2/b3738b6a93ec47949689248d7fcccfaa/bin:$PATH
5050
python3 proto2yaml.py example/example.proto \
5151
--namespace peak \
5252
--server_class_name GrpcServer \

example/include/grpc_server.hpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,6 @@ using ExampleServerStreamingRPC = agrpc::ServerRPC<
7878
&fantasy::v1::Example::AsyncService::RequestServerStreaming>;
7979
using ExampleClientStreamingRPC = agrpc::ServerRPC<
8080
&fantasy::v1::Example::AsyncService::RequestClientStreaming>;
81-
#ifdef AGRPC_BOOST_ASIO
82-
template <typename T>
83-
using ConcurrentChannel =
84-
asio::experimental::concurrent_channel<void(boost::system::error_code, T)>;
85-
#else
86-
template <typename T>
87-
using ConcurrentChannel =
88-
asio::experimental::concurrent_channel<void(asio::error_code, T)>;
89-
#endif
90-
9181
/*************************************************** */
9282
#if USE_GRPC_NOTIFY_WHEN_DONE
9383
struct GrpcServerServerRPCNotifyWhenDoneTraits : agrpc::DefaultServerRPCTraits {

example/src/server.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,10 @@ struct TestServer {
125125
waiter.initiate(agrpc::read, rpc, request);
126126

127127
using DATA = std::shared_ptr<Message<std::string>>;
128-
auto chan =
129-
std::make_shared<peak::ConcurrentChannel<DATA>>(rpc.get_executor(),
130-
m_channel_size);
128+
using ConcurrentChannel = boost::asio::experimental::concurrent_channel<
129+
void(boost::system::error_code, DATA)>;
130+
auto chan = std::make_shared<ConcurrentChannel>(rpc.get_executor(),
131+
m_channel_size);
131132

132133
auto stop_chan = std::make_shared<StopChannel>(rpc.get_executor(), 1);
133134

example_project/include/grpc_server.hpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,6 @@ using ExampleServerStreamingRPC = agrpc::ServerRPC<
7878
&fantasy::v1::Example::AsyncService::RequestServerStreaming>;
7979
using ExampleClientStreamingRPC = agrpc::ServerRPC<
8080
&fantasy::v1::Example::AsyncService::RequestClientStreaming>;
81-
#ifdef AGRPC_BOOST_ASIO
82-
template <typename T>
83-
using ConcurrentChannel =
84-
asio::experimental::concurrent_channel<void(boost::system::error_code, T)>;
85-
#else
86-
template <typename T>
87-
using ConcurrentChannel =
88-
asio::experimental::concurrent_channel<void(asio::error_code, T)>;
89-
#endif
90-
9181
/*************************************************** */
9282
#if USE_GRPC_NOTIFY_WHEN_DONE
9383
struct GrpcServerServerRPCNotifyWhenDoneTraits : agrpc::DefaultServerRPCTraits {

template/grpc_server.hpp.j2

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,6 @@ using {{service_name}}{{interface.name}}RPC = agrpc::ServerRPC<&{{grpc.package}}
7676
{% endfor -%}
7777
{% endfor -%}
7878

79-
#ifdef AGRPC_BOOST_ASIO
80-
template <typename T>
81-
using ConcurrentChannel = asio::experimental::concurrent_channel<void(boost::system::error_code, T)>;
82-
#else
83-
template <typename T>
84-
using ConcurrentChannel = asio::experimental::concurrent_channel<void(asio::error_code, T)>;
85-
#endif
86-
8779
/*************************************************** */
8880
#if USE_GRPC_NOTIFY_WHEN_DONE
8981
struct {{grpc.server_class_name}}ServerRPCNotifyWhenDoneTraits : agrpc::DefaultServerRPCTraits {

0 commit comments

Comments
 (0)