Comments (11)
Oh the recycling_allocator is part of Asio, which means it is also available in standalone asio: https://think-async.com/Asio/asio-1.24.0/doc/asio/reference/recycling_allocator/recycling_allocator.html
from asio-grpc.
When using clang+libc++ you can tell asio-grpc to utilize Boost.Container instead of <memory_resource>
. See Usage in the README. For example, vcpkg with standalone asio would look like this:
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
"name": "test",
"version": "0.1.0",
"dependencies": [
{
"name": "asio-grpc",
"features": [
"boost-container"
]
},
"asio"
]
}
from asio-grpc.
Thanks, I have seen it. But I hoped to use it without Boost. Purely with standalone asio. May be add another option for experimental prefix?
from asio-grpc.
Sure, I can look into it. experimental/memory_resource won't work however, because it does not contain unsynchronized_pool_resource. I could use something like recycling_allocator instead.
from asio-grpc.
Yes, you are right, experimental/memory_resource doesn't contain unsynchronized_pool_resource.
Unfortunately recycling_allocator is not a big deal either because of Boost dependency.
Will look for another workaround.
Tried to update clang to 15. No luck.
The work on memory_resource has been abandoned in clang:
https://quuxplusone.github.io/blog/2018/06/05/libcpp-memory-resource/
from asio-grpc.
Well, it would be great! Looking forward for the commit =)
from asio-grpc.
Master branch now contains an option to enable the use of recycling_allocator:
set(ASIO_GRPC_USE_RECYCLING_ALLOCATOR on)
set(ASIO_GRPC_USE_BOOST_CONTAINER off)
add_subdirectory(/path/to/repository/root)
from asio-grpc.
Version 2.4.0 has been released containing this feature. I also simplified it such that
set(ASIO_GRPC_USE_RECYCLING_ALLOCATOR on)
add_subdirectory(/path/to/repository/root)
should do the trick. Let me know if everything works as you expect.
from asio-grpc.
Hi @ivan-volnov,
have you found some time to test the new feature, does it work as you expect? If so, could you close the issue please?
from asio-grpc.
Hi @Tradias,
Thank you very much for fixing the issue.
I ended up with writing my own small one-file implementation of the library using your old blog post. Thanks a lot for this!
So, I can't test it anymore...
I don't use the code I don't understand or that has a lot of redundant stuff.
My recommendations are: refactor the library, make it small and easy as possible.
from asio-grpc.
Glad to hear that my blog post was helpful.
In the immediate future I plan on adding a Tutorial section to the documentation, but aimed at users more than maintainers. Nonetheless, it might shed some light on the complexity in some parts of the library. For v3 I also plan on removing some parts of the public API and simplify things like repeatedly_request
.
With libraries it is always a tricky dance between genericity and focus.
from asio-grpc.
Related Issues (20)
- Provide operator bool to check the validity of ServerPRCPtr HOT 1
- Question: add sender after run HOT 1
- simple program stuck HOT 2
- Consult some questions HOT 9
- Asio-gRPC seems to have TSAN warnings HOT 8
- How to detect client closed connection HOT 6
- Can I call ServerBuilder::BuildAndStart() after GrpcContext::run() HOT 2
- Questions on how to switch from an GrpcContext to io_context and back HOT 6
- How to shutdown grpc clients HOT 1
- Clarification Needed on Thread Context Switch in writer() Function (example streaming-server.cpp) HOT 8
- assertion failed: !started_ HOT 2
- Can I use asio-grpc inside an existing boost::asio application? HOT 7
- The agrpc::GrpcContext hangs forever HOT 13
- an upgrade from 2.5.1 to 2.9.1 leads to build errors HOT 6
- build fails with latest boost 1.84 HOT 4
- [Question]: Slowly receiveing client in long-lived streaming HOT 6
- InvokeHandler conflicts with Objective-C/C++ defines HOT 1
- Need some basic help! HOT 9
- How to make grPC Client to Establish connection based on IP address? HOT 2
- Update conan package to 3.0.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asio-grpc.