-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adopt absl common libraries #1754
Comments
@htuch are there any API docs? I can't find any? Or should I just browse the source? |
I took a brief look through and the code looks sane and not Boost like to me so no objections from me. I have a small preference to wait until there is a thing we really want to use from here (string view sounds pretty useful, not sure what else there is), but not a big deal. |
I looked at some of the thread annotations, and it would allow annotating the lock-ordering I committed yesterday, and it looks like clang would warn if the order is violated, so that would be useful (
|
I looked at the annotation stuff very briefly. How does that work? Does clang have pluggable annotations? Or these are annotations already implemented by clang? |
There's some nifty stuff built into clang: https://clang.llvm.org/docs/ThreadSafetyAnalysis.html abseil adds macros for using it, and has the appropriate checks for if the compiler supports the annotations. |
Cool that's pretty neat. SGTM. |
Description: -Adds a ThreadSafe singleton class which can be accessed from all threads and overridden with an injected instance for custom implementations for test code or custom Envoy builds. -Replaces OsSysCallsImpl being plumbed everywhere it is needed with a new ThreadSafe singleton as a sample use case (and to avoid having to plumb the OsSysCallsImpl to all users for test overrides) -Adds abseil as a dependency Fixes #1808 Step 1 of #1754 Risk Level: Low: mainly a refactor to how OsSysCallsImpl is accessed Testing: Existing OS tests continue to pass, now using an inject-able mock singleton test/common/common/singleton_test.cc unit testing the new class Signed-off-by: Alyssa Wilk <[email protected]>
This is done. We can start using ABSL now. |
Google's common C++ libraries are now OSS: https://github.com/abseil/abseil-cpp. This a lightweight alternative to something like Boost which can replace existing adhoc utils such as string join/split with standard implementations.
This issue will track a proposal to:
common/common/utility.h
,Optional
, mutexes,make_unique
, (others?)The text was updated successfully, but these errors were encountered: