Asynchronous gRPC with Asio/unified executors
APACHE-2.0 License
Bot releases are hidden (Show)
Published by Tradias over 2 years ago
agrpc::use_scheduler
has been renamed to agrpc::use_sender
. The old version will be removed in v1.5.0.agrpc::repeatedly_request
's API. It now supports CancellationSlot/StopToken, asio::awaitable
, Sender
and a final CompletionToken. Also reduced the memory needed per request. See documentation and examples for more details.agrpc::write_last
which coalesces write and finish for server-side streaming RPCs and combines write and writes_done for client-side streaming RPCs.agrpc::wait
.asio_grpc_protobuf_generate
can now handle .proto files that are nested within the import directory.get_completion_queue
into a function object.agrpc::wait
was incorrectly using the cancellation slot of the CompletionToken instead of the CompletionHandler, leading to broken cancellation propagation.target_link_libraries
call in CMake which can lead to hard to decipher errors: https://github.com/Tradias/asio-grpc/issues/12.agrpc::use_sender
is the CompletionToken.find_package
are needed in the As a subdirectory
section of the README.Using vcpkg
section of the README to reflect the automatic interface link library setup performed by asio-grpcConfig,cmake.Published by Tradias almost 3 years ago
GrpcSender
and ScheduleSender
into the detail namespaceUseScheduler
Published by Tradias almost 3 years ago
agrpc::use_scheduler
that causes an RPC step function to return a TypedSenderasio-grpc::asio-grpc-standalone-asio
and asio-grpc::asio-grpc-unifex
for the standalone Asio and libunifex based versions of this library respectivelyASIO_GRPC_DISABLE_AUTOLINK
before the call to find_package(asio-grpc)
agrpc::write
with grpc::WriteOptions
overloadsGrpcContext
from the thread that called .run()
and even more so from other threadsGrpcContext::run
implementationPublished by Tradias almost 3 years ago
asio_grpc_protobuf_generate
.GrpcContext
similar to boost::asio::io_context
. E.g. instead of writingauto guard = boost::asio::make_work_guard(grpc_context);
boost::asio::post(grpc_context,
[]
{
guard.reset();
});
grpc_context.run();
it is now sufficient to write:
boost::asio::post(grpc_context, [] {});
grpc_context.run();
GrpcContext
is now stopped after returning from run()
if there were no outstanding operations when the call was made.GrpcExecutor::operator==
would fail to compare executors with different execution properties.Published by Tradias about 3 years ago
ASIO_GRPC_USE_BOOST_CONTAINER
related header files in the build directory instead of the source directory as required by vcpkg_cmake_configure.Published by Tradias about 3 years ago
agrpc::GrpcContext
constructor which would incorrectly turn a completion handler with an associated std::allocator
into a completion handler that uses the specified argument for allocations. If control over the allocator is needed then resort to Boost.Asio's standard mechanisms: Associate the allocator with the completion handler or boost::asio::require
the allocator from the executor.ASIO_GRPC_USE_BOOST_CONTAINER
into the installed header files to avoid accidental mixing of libraries compiled with and without it. This behavior is also required by vcpkg.Published by Tradias about 3 years ago
<memory_resource>
by setting the CMake variable ASIO_GRPC_USE_BOOST_CONTAINER
agrpc::wait
can now be cancelled by associating a cancellation slot to the CompletionToken (Boost 1.77.0)agrpc::repeatedly_request
. Can be used by servers to ensure that there are enough outstanding calls to request a new RPC. It takes a function object which should define how to handle an incoming RPC, it could e.g. be co_spawn
ing a new coroutine to process it.boost::asio::require(grpc_executor, boost::asio::execution::allocator)
would not compile due to calling a constructor that is explicitagrpc::GrpcContext::run
DefaultCompletionToken
without coroutines being availableagrpc::request
functionsfind_package
or link with gRPC::grpc++
and Boost::headers
when only installing the CMake projectPublished by Tradias about 3 years ago
Published by Tradias about 3 years ago
agrpc::GrpcContext
agrpc::GrpcExecutor