Releases: Tradias/asio-grpc
Releases · Tradias/asio-grpc
v3.6.1
Fixes
- Heap-use-after-free when submitting work to another GrpcContext while inside of a GrpcContext::run/poll and then destructing that context. Example:
agrpc::GrpcContext grpc_context;
{
agrpc::GrpcContext grpc_context2;
asio::post(grpc_context2,
[&]
{
asio::post(grpc_context, [] {});
});
grpc_context2.run();
}
grpc_context.run();v3.6.0
Features
- Make gRPC callback API compatible with stdexec/unifex.
Fixes
- Use of
Alarm{}.wait()in an asio parallel_group led to a crash when the alarm completed normally and asio tried to cancel it afterwards. - Compilation error related to the new
asio::inline_executorin Boost 1.90
Chore
- Update vcpkg. includes Boost 1.90 update.
v3.5.2
v3.5.1
v3.5.0
Features
- New API that wraps gRPC reactors into Asio I/O objects. This should become the most performant API as soon as gRPC de-experimentalizes their EventEngine API and asio-grpc provides an Asio based implementation of it.
- Add support for stdexec R10
Fixes
ManualResetEventwould sometimes not complete immediately when callingwait()even though the event is ready.- Address some Wshadow warning
Chore
- Remove Ubuntu 20.04 actions thereby raising supported GCC version to 10 an Clang to 13
v3.4.3
Fixes
GrpcContext::run_while(condition)should not go into waiting on thegrpc::CompletionQueueif processing local work satisfied the condition.
Documentation
- Add a remark to
GrpcContext::run_untilandGrpcContext::run_while: The number of additional, completed operations that will be processed after the condition/deadline was met is unspecified.
Chore
- Update vcpkg, includes gRPC 1.71.0 and Boost 1.87 update.
v3.4.2
v3.4.1
v3.4.0
Features
- (experimental) RPC handlers passed to
register_xfunctions may now have a member function calledrequest_message_factory()whose return object will be used to create the initial request message in unary and server-streaming rpcs. This can be used to allocate the message in a protobuf arena (example) or reuse it between rpcs. - Make Asio based
register_xfunctions compatible withGrpcContext::run_completion_queue/poll_completion_queue() - Cleanup
asio-grpc.natvisand add support for Asio+libunifex/stdexec mixed builds.
Performance
- Changed
GrpcContext::shutdown_from atomic to regularbool. This bool is checked at the start and end of every asynchronous operation.
Documentation
- Add server example showing how to use an
asio::io_contextas the main execution context and aGrpcContexton a separate thread withGrpcContext::run_completion_queue().
v3.3.0
Features
- (experimental) Add
agrpc::register_coroutine_rpc_handler, a generic version ofagrpc::register_awaitable_rpc_handlerthat can be used to handle RPCs with all kinds of awaitable types likeasio::experimental::coroandboost::cobalt::task. This can, for example, be used to implement async generator style rpc handler:
asio::experimental::coro<const example::v1::Response*, grpc::Status>
handle_server_streaming_request(agrpc::GrpcExecutor executor, example::v1::Request& request)
{
example::v1::Response response;
response.set_integer(request.integer());
agrpc::Alarm alarm{executor};
for (size_t i{}; i != 5; ++i)
{
response.set_integer(response.integer() + 1);
co_yield &response;
co_await alarm.wait(std::chrono::system_clock::now() + std::chrono::seconds(1));
}
co_return grpc::Status::OK;
}Fixes
- Fix compilation of
health_check_service.hppwith recent gRPC versions by removing use ofGPR_ASSERTmacro.
Documentation
- Code snippets now have a copy button in the top right corner.
- Improve several links between classes/functions in the documentation.
- Document
agrpc::DefaultServerRPCTraits. - Fix empty documentation of
agrpc::ClientRPC<GENERIC_STREAMING>andagrpc::ServerRPC<GENERIC>.
Chore
- Replace Clang 12 build with Clang 18.
- Update doxygen to 1.12.0 and doxygen-awesome to 2.3.4.
- Update vcpkg, includes Boost 1.86 update.