BUILD: move work_serializer to its own build target (#30255)

* BUILD: move work_serializer to its own build target

* add autodeps tag

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
pull/30286/head
Mark D. Roth 3 years ago committed by GitHub
parent 8aeb548590
commit 4491ed26aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 38
      BUILD
  2. 6
      CMakeLists.txt
  3. 4
      Makefile
  4. 10
      build_autogenerated.yaml
  5. 2
      config.m4
  6. 2
      config.w32
  7. 4
      gRPC-C++.podspec
  8. 6
      gRPC-Core.podspec
  9. 4
      grpc.gemspec
  10. 4
      grpc.gyp
  11. 4
      package.xml
  12. 2
      src/core/ext/filters/client_channel/client_channel.cc
  13. 2
      src/core/ext/filters/client_channel/client_channel.h
  14. 2
      src/core/ext/filters/client_channel/lb_policy.h
  15. 2
      src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
  16. 2
      src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc
  17. 2
      src/core/ext/filters/client_channel/lb_policy/priority/priority.cc
  18. 2
      src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc
  19. 2
      src/core/ext/filters/client_channel/lb_policy/rls/rls.cc
  20. 2
      src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc
  21. 3
      src/core/ext/filters/client_channel/lb_policy/xds/cds.cc
  22. 2
      src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc
  23. 2
      src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc
  24. 2
      src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
  25. 2
      src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc
  26. 2
      src/core/ext/filters/client_channel/resolver/polling_resolver.cc
  27. 2
      src/core/ext/filters/client_channel/resolver/polling_resolver.h
  28. 2
      src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc
  29. 2
      src/core/ext/xds/xds_client.h
  30. 52
      src/core/lib/gprpp/work_serializer.cc
  31. 48
      src/core/lib/gprpp/work_serializer.h
  32. 2
      src/core/lib/transport/connectivity_state.h
  33. 2
      src/python/grpcio/grpc_core_dependencies.py
  34. 2
      test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc
  35. 3
      test/core/client_channel/resolvers/dns_resolver_test.cc
  36. 2
      test/core/client_channel/resolvers/fake_resolver_test.cc
  37. 3
      test/core/client_channel/resolvers/sockaddr_resolver_test.cc
  38. 18
      test/core/gprpp/BUILD
  39. 2
      test/core/gprpp/work_serializer_test.cc
  40. 18
      test/core/iomgr/BUILD
  41. 2
      test/cpp/naming/cancel_ares_query_test.cc
  42. 2
      test/cpp/naming/resolver_component_test.cc
  43. 4
      tools/doxygen/Doxyfile.c++.internal
  44. 4
      tools/doxygen/Doxyfile.core.internal

38
BUILD

@ -1022,6 +1022,26 @@ grpc_cc_library(
deps = ["useful"],
)
grpc_cc_library(
name = "work_serializer",
srcs = [
"src/core/lib/gprpp/work_serializer.cc",
],
hdrs = [
"src/core/lib/gprpp/work_serializer.h",
],
external_deps = ["absl/base:core_headers"],
language = "c++",
tags = ["grpc-autodeps"],
visibility = ["@grpc:client_channel"],
deps = [
"debug_location",
"gpr_base",
"grpc_trace",
"orphanable",
],
)
grpc_cc_library(
name = "gpr_codegen",
language = "c++",
@ -2592,7 +2612,6 @@ grpc_cc_library(
"src/core/lib/iomgr/wakeup_fd_nospecial.cc",
"src/core/lib/iomgr/wakeup_fd_pipe.cc",
"src/core/lib/iomgr/wakeup_fd_posix.cc",
"src/core/lib/iomgr/work_serializer.cc",
"src/core/lib/resource_quota/api.cc",
"src/core/lib/slice/b64.cc",
"src/core/lib/slice/slice_api.cc",
@ -2693,7 +2712,6 @@ grpc_cc_library(
"src/core/lib/iomgr/unix_sockets_posix.h",
"src/core/lib/iomgr/wakeup_fd_pipe.h",
"src/core/lib/iomgr/wakeup_fd_posix.h",
"src/core/lib/iomgr/work_serializer.h",
"src/core/lib/slice/b64.h",
"src/core/lib/surface/api_trace.h",
"src/core/lib/surface/builtins.h",
@ -2810,6 +2828,7 @@ grpc_cc_library(
"transport_fwd",
"uri_parser",
"useful",
"work_serializer",
],
)
@ -3220,6 +3239,7 @@ grpc_cc_library(
"unique_type_name",
"uri_parser",
"useful",
"work_serializer",
"xds_orca_service_upb",
"xds_orca_upb",
],
@ -3686,6 +3706,7 @@ grpc_cc_library(
"time",
"uri_parser",
"useful",
"work_serializer",
],
)
@ -3743,6 +3764,7 @@ grpc_cc_library(
"slice_refcount",
"time",
"uri_parser",
"work_serializer",
],
)
@ -3903,6 +3925,7 @@ grpc_cc_library(
"tsi_ssl_credentials",
"uri_parser",
"useful",
"work_serializer",
"xds_type_upb",
"xds_type_upbdefs",
],
@ -4059,6 +4082,7 @@ grpc_cc_library(
"server_address",
"time",
"unique_type_name",
"work_serializer",
],
)
@ -4125,6 +4149,7 @@ grpc_cc_library(
"ref_counted_ptr",
"server_address",
"time",
"work_serializer",
],
)
@ -4198,6 +4223,7 @@ grpc_cc_library(
"ref_counted_ptr",
"server_address",
"time",
"work_serializer",
],
)
@ -4318,6 +4344,7 @@ grpc_cc_library(
"server_address",
"sockaddr_utils",
"unique_type_name",
"work_serializer",
],
)
@ -4403,6 +4430,7 @@ grpc_cc_library(
"ref_counted_ptr",
"server_address",
"sockaddr_utils",
"work_serializer",
],
)
@ -4440,6 +4468,7 @@ grpc_cc_library(
"ref_counted_ptr",
"server_address",
"time",
"work_serializer",
],
)
@ -4475,6 +4504,7 @@ grpc_cc_library(
"ref_counted_ptr",
"server_address",
"time",
"work_serializer",
],
)
@ -4667,6 +4697,7 @@ grpc_cc_library(
"orphanable",
"ref_counted_ptr",
"uri_parser",
"work_serializer",
],
)
@ -4864,6 +4895,7 @@ grpc_cc_library(
"slice",
"uri_parser",
"useful",
"work_serializer",
],
)
@ -4923,6 +4955,7 @@ grpc_cc_library(
"unique_type_name",
"uri_parser",
"useful",
"work_serializer",
],
)
@ -4958,6 +4991,7 @@ grpc_cc_library(
"resource_quota",
"time",
"uri_parser",
"work_serializer",
],
)

6
CMakeLists.txt generated

@ -2079,6 +2079,7 @@ add_library(grpc
src/core/lib/event_engine/trace.cc
src/core/lib/gprpp/status_helper.cc
src/core/lib/gprpp/time.cc
src/core/lib/gprpp/work_serializer.cc
src/core/lib/http/format_request.cc
src/core/lib/http/httpcli.cc
src/core/lib/http/httpcli_security_connector.cc
@ -2156,7 +2157,6 @@ add_library(grpc
src/core/lib/iomgr/wakeup_fd_nospecial.cc
src/core/lib/iomgr/wakeup_fd_pipe.cc
src/core/lib/iomgr/wakeup_fd_posix.cc
src/core/lib/iomgr/work_serializer.cc
src/core/lib/json/json_reader.cc
src/core/lib/json/json_util.cc
src/core/lib/json/json_writer.cc
@ -2709,6 +2709,7 @@ add_library(grpc_unsecure
src/core/lib/event_engine/trace.cc
src/core/lib/gprpp/status_helper.cc
src/core/lib/gprpp/time.cc
src/core/lib/gprpp/work_serializer.cc
src/core/lib/http/format_request.cc
src/core/lib/http/httpcli.cc
src/core/lib/http/parser.cc
@ -2785,7 +2786,6 @@ add_library(grpc_unsecure
src/core/lib/iomgr/wakeup_fd_nospecial.cc
src/core/lib/iomgr/wakeup_fd_pipe.cc
src/core/lib/iomgr/wakeup_fd_posix.cc
src/core/lib/iomgr/work_serializer.cc
src/core/lib/json/json_reader.cc
src/core/lib/json/json_util.cc
src/core/lib/json/json_writer.cc
@ -18451,7 +18451,7 @@ if(gRPC_BUILD_TESTS)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_executable(work_serializer_test
test/core/iomgr/work_serializer_test.cc
test/core/gprpp/work_serializer_test.cc
third_party/googletest/googletest/src/gtest-all.cc
third_party/googletest/googlemock/src/gmock-all.cc
)

4
Makefile generated

@ -1462,6 +1462,7 @@ LIBGRPC_SRC = \
src/core/lib/event_engine/trace.cc \
src/core/lib/gprpp/status_helper.cc \
src/core/lib/gprpp/time.cc \
src/core/lib/gprpp/work_serializer.cc \
src/core/lib/http/format_request.cc \
src/core/lib/http/httpcli.cc \
src/core/lib/http/httpcli_security_connector.cc \
@ -1539,7 +1540,6 @@ LIBGRPC_SRC = \
src/core/lib/iomgr/wakeup_fd_nospecial.cc \
src/core/lib/iomgr/wakeup_fd_pipe.cc \
src/core/lib/iomgr/wakeup_fd_posix.cc \
src/core/lib/iomgr/work_serializer.cc \
src/core/lib/json/json_reader.cc \
src/core/lib/json/json_util.cc \
src/core/lib/json/json_writer.cc \
@ -1931,6 +1931,7 @@ LIBGRPC_UNSECURE_SRC = \
src/core/lib/event_engine/trace.cc \
src/core/lib/gprpp/status_helper.cc \
src/core/lib/gprpp/time.cc \
src/core/lib/gprpp/work_serializer.cc \
src/core/lib/http/format_request.cc \
src/core/lib/http/httpcli.cc \
src/core/lib/http/parser.cc \
@ -2007,7 +2008,6 @@ LIBGRPC_UNSECURE_SRC = \
src/core/lib/iomgr/wakeup_fd_nospecial.cc \
src/core/lib/iomgr/wakeup_fd_pipe.cc \
src/core/lib/iomgr/wakeup_fd_posix.cc \
src/core/lib/iomgr/work_serializer.cc \
src/core/lib/json/json_reader.cc \
src/core/lib/json/json_util.cc \
src/core/lib/json/json_writer.cc \

@ -770,6 +770,7 @@ libs:
- src/core/lib/gprpp/table.h
- src/core/lib/gprpp/time.h
- src/core/lib/gprpp/unique_type_name.h
- src/core/lib/gprpp/work_serializer.h
- src/core/lib/http/format_request.h
- src/core/lib/http/httpcli.h
- src/core/lib/http/httpcli_ssl_credentials.h
@ -837,7 +838,6 @@ libs:
- src/core/lib/iomgr/unix_sockets_posix.h
- src/core/lib/iomgr/wakeup_fd_pipe.h
- src/core/lib/iomgr/wakeup_fd_posix.h
- src/core/lib/iomgr/work_serializer.h
- src/core/lib/json/json.h
- src/core/lib/json/json_util.h
- src/core/lib/matchers/matchers.h
@ -1439,6 +1439,7 @@ libs:
- src/core/lib/event_engine/trace.cc
- src/core/lib/gprpp/status_helper.cc
- src/core/lib/gprpp/time.cc
- src/core/lib/gprpp/work_serializer.cc
- src/core/lib/http/format_request.cc
- src/core/lib/http/httpcli.cc
- src/core/lib/http/httpcli_security_connector.cc
@ -1516,7 +1517,6 @@ libs:
- src/core/lib/iomgr/wakeup_fd_nospecial.cc
- src/core/lib/iomgr/wakeup_fd_pipe.cc
- src/core/lib/iomgr/wakeup_fd_posix.cc
- src/core/lib/iomgr/work_serializer.cc
- src/core/lib/json/json_reader.cc
- src/core/lib/json/json_util.cc
- src/core/lib/json/json_writer.cc
@ -1986,6 +1986,7 @@ libs:
- src/core/lib/gprpp/table.h
- src/core/lib/gprpp/time.h
- src/core/lib/gprpp/unique_type_name.h
- src/core/lib/gprpp/work_serializer.h
- src/core/lib/http/format_request.h
- src/core/lib/http/httpcli.h
- src/core/lib/http/parser.h
@ -2052,7 +2053,6 @@ libs:
- src/core/lib/iomgr/unix_sockets_posix.h
- src/core/lib/iomgr/wakeup_fd_pipe.h
- src/core/lib/iomgr/wakeup_fd_posix.h
- src/core/lib/iomgr/work_serializer.h
- src/core/lib/json/json.h
- src/core/lib/json/json_util.h
- src/core/lib/promise/activity.h
@ -2303,6 +2303,7 @@ libs:
- src/core/lib/event_engine/trace.cc
- src/core/lib/gprpp/status_helper.cc
- src/core/lib/gprpp/time.cc
- src/core/lib/gprpp/work_serializer.cc
- src/core/lib/http/format_request.cc
- src/core/lib/http/httpcli.cc
- src/core/lib/http/parser.cc
@ -2379,7 +2380,6 @@ libs:
- src/core/lib/iomgr/wakeup_fd_nospecial.cc
- src/core/lib/iomgr/wakeup_fd_pipe.cc
- src/core/lib/iomgr/wakeup_fd_posix.cc
- src/core/lib/iomgr/work_serializer.cc
- src/core/lib/json/json_reader.cc
- src/core/lib/json/json_util.cc
- src/core/lib/json/json_writer.cc
@ -9396,7 +9396,7 @@ targets:
language: c++
headers: []
src:
- test/core/iomgr/work_serializer_test.cc
- test/core/gprpp/work_serializer_test.cc
deps:
- grpc_test_util
platforms:

2
config.m4 generated

@ -521,6 +521,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/gprpp/thd_windows.cc \
src/core/lib/gprpp/time.cc \
src/core/lib/gprpp/time_util.cc \
src/core/lib/gprpp/work_serializer.cc \
src/core/lib/http/format_request.cc \
src/core/lib/http/httpcli.cc \
src/core/lib/http/httpcli_security_connector.cc \
@ -598,7 +599,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/iomgr/wakeup_fd_nospecial.cc \
src/core/lib/iomgr/wakeup_fd_pipe.cc \
src/core/lib/iomgr/wakeup_fd_posix.cc \
src/core/lib/iomgr/work_serializer.cc \
src/core/lib/json/json_reader.cc \
src/core/lib/json/json_util.cc \
src/core/lib/json/json_writer.cc \

2
config.w32 generated

@ -487,6 +487,7 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\gprpp\\thd_windows.cc " +
"src\\core\\lib\\gprpp\\time.cc " +
"src\\core\\lib\\gprpp\\time_util.cc " +
"src\\core\\lib\\gprpp\\work_serializer.cc " +
"src\\core\\lib\\http\\format_request.cc " +
"src\\core\\lib\\http\\httpcli.cc " +
"src\\core\\lib\\http\\httpcli_security_connector.cc " +
@ -564,7 +565,6 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\iomgr\\wakeup_fd_nospecial.cc " +
"src\\core\\lib\\iomgr\\wakeup_fd_pipe.cc " +
"src\\core\\lib\\iomgr\\wakeup_fd_posix.cc " +
"src\\core\\lib\\iomgr\\work_serializer.cc " +
"src\\core\\lib\\json\\json_reader.cc " +
"src\\core\\lib\\json\\json_util.cc " +
"src\\core\\lib\\json\\json_writer.cc " +

4
gRPC-C++.podspec generated

@ -729,6 +729,7 @@ Pod::Spec.new do |s|
'src/core/lib/gprpp/time.h',
'src/core/lib/gprpp/time_util.h',
'src/core/lib/gprpp/unique_type_name.h',
'src/core/lib/gprpp/work_serializer.h',
'src/core/lib/http/format_request.h',
'src/core/lib/http/httpcli.h',
'src/core/lib/http/httpcli_ssl_credentials.h',
@ -796,7 +797,6 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/unix_sockets_posix.h',
'src/core/lib/iomgr/wakeup_fd_pipe.h',
'src/core/lib/iomgr/wakeup_fd_posix.h',
'src/core/lib/iomgr/work_serializer.h',
'src/core/lib/json/json.h',
'src/core/lib/json/json_util.h',
'src/core/lib/matchers/matchers.h',
@ -1567,6 +1567,7 @@ Pod::Spec.new do |s|
'src/core/lib/gprpp/time.h',
'src/core/lib/gprpp/time_util.h',
'src/core/lib/gprpp/unique_type_name.h',
'src/core/lib/gprpp/work_serializer.h',
'src/core/lib/http/format_request.h',
'src/core/lib/http/httpcli.h',
'src/core/lib/http/httpcli_ssl_credentials.h',
@ -1634,7 +1635,6 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/unix_sockets_posix.h',
'src/core/lib/iomgr/wakeup_fd_pipe.h',
'src/core/lib/iomgr/wakeup_fd_posix.h',
'src/core/lib/iomgr/work_serializer.h',
'src/core/lib/json/json.h',
'src/core/lib/json/json_util.h',
'src/core/lib/matchers/matchers.h',

6
gRPC-Core.podspec generated

@ -1148,6 +1148,8 @@ Pod::Spec.new do |s|
'src/core/lib/gprpp/time_util.cc',
'src/core/lib/gprpp/time_util.h',
'src/core/lib/gprpp/unique_type_name.h',
'src/core/lib/gprpp/work_serializer.cc',
'src/core/lib/gprpp/work_serializer.h',
'src/core/lib/http/format_request.cc',
'src/core/lib/http/format_request.h',
'src/core/lib/http/httpcli.cc',
@ -1292,8 +1294,6 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/wakeup_fd_pipe.h',
'src/core/lib/iomgr/wakeup_fd_posix.cc',
'src/core/lib/iomgr/wakeup_fd_posix.h',
'src/core/lib/iomgr/work_serializer.cc',
'src/core/lib/iomgr/work_serializer.h',
'src/core/lib/json/json.h',
'src/core/lib/json/json_reader.cc',
'src/core/lib/json/json_util.cc',
@ -2177,6 +2177,7 @@ Pod::Spec.new do |s|
'src/core/lib/gprpp/time.h',
'src/core/lib/gprpp/time_util.h',
'src/core/lib/gprpp/unique_type_name.h',
'src/core/lib/gprpp/work_serializer.h',
'src/core/lib/http/format_request.h',
'src/core/lib/http/httpcli.h',
'src/core/lib/http/httpcli_ssl_credentials.h',
@ -2244,7 +2245,6 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/unix_sockets_posix.h',
'src/core/lib/iomgr/wakeup_fd_pipe.h',
'src/core/lib/iomgr/wakeup_fd_posix.h',
'src/core/lib/iomgr/work_serializer.h',
'src/core/lib/json/json.h',
'src/core/lib/json/json_util.h',
'src/core/lib/matchers/matchers.h',

4
grpc.gemspec generated

@ -1061,6 +1061,8 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/gprpp/time_util.cc )
s.files += %w( src/core/lib/gprpp/time_util.h )
s.files += %w( src/core/lib/gprpp/unique_type_name.h )
s.files += %w( src/core/lib/gprpp/work_serializer.cc )
s.files += %w( src/core/lib/gprpp/work_serializer.h )
s.files += %w( src/core/lib/http/format_request.cc )
s.files += %w( src/core/lib/http/format_request.h )
s.files += %w( src/core/lib/http/httpcli.cc )
@ -1205,8 +1207,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/iomgr/wakeup_fd_pipe.h )
s.files += %w( src/core/lib/iomgr/wakeup_fd_posix.cc )
s.files += %w( src/core/lib/iomgr/wakeup_fd_posix.h )
s.files += %w( src/core/lib/iomgr/work_serializer.cc )
s.files += %w( src/core/lib/iomgr/work_serializer.h )
s.files += %w( src/core/lib/json/json.h )
s.files += %w( src/core/lib/json/json_reader.cc )
s.files += %w( src/core/lib/json/json_util.cc )

4
grpc.gyp generated

@ -813,6 +813,7 @@
'src/core/lib/event_engine/trace.cc',
'src/core/lib/gprpp/status_helper.cc',
'src/core/lib/gprpp/time.cc',
'src/core/lib/gprpp/work_serializer.cc',
'src/core/lib/http/format_request.cc',
'src/core/lib/http/httpcli.cc',
'src/core/lib/http/httpcli_security_connector.cc',
@ -890,7 +891,6 @@
'src/core/lib/iomgr/wakeup_fd_nospecial.cc',
'src/core/lib/iomgr/wakeup_fd_pipe.cc',
'src/core/lib/iomgr/wakeup_fd_posix.cc',
'src/core/lib/iomgr/work_serializer.cc',
'src/core/lib/json/json_reader.cc',
'src/core/lib/json/json_util.cc',
'src/core/lib/json/json_writer.cc',
@ -1275,6 +1275,7 @@
'src/core/lib/event_engine/trace.cc',
'src/core/lib/gprpp/status_helper.cc',
'src/core/lib/gprpp/time.cc',
'src/core/lib/gprpp/work_serializer.cc',
'src/core/lib/http/format_request.cc',
'src/core/lib/http/httpcli.cc',
'src/core/lib/http/parser.cc',
@ -1351,7 +1352,6 @@
'src/core/lib/iomgr/wakeup_fd_nospecial.cc',
'src/core/lib/iomgr/wakeup_fd_pipe.cc',
'src/core/lib/iomgr/wakeup_fd_posix.cc',
'src/core/lib/iomgr/work_serializer.cc',
'src/core/lib/json/json_reader.cc',
'src/core/lib/json/json_util.cc',
'src/core/lib/json/json_writer.cc',

4
package.xml generated

@ -1043,6 +1043,8 @@
<file baseinstalldir="/" name="src/core/lib/gprpp/time_util.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/time_util.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/unique_type_name.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/work_serializer.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/work_serializer.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/http/format_request.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/http/format_request.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/http/httpcli.cc" role="src" />
@ -1187,8 +1189,6 @@
<file baseinstalldir="/" name="src/core/lib/iomgr/wakeup_fd_pipe.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/wakeup_fd_posix.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/wakeup_fd_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/work_serializer.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/work_serializer.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/json/json.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/json/json_reader.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/json/json_util.cc" role="src" />

@ -68,10 +68,10 @@
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/json/json.h"
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/resolver/resolver_registry.h"

@ -57,12 +57,12 @@
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/unique_type_name.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/call_combiner.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/iomgr_fwd.h"
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/resolver/resolver.h"
#include "src/core/lib/resource_quota/arena.h"
#include "src/core/lib/service_config/service_config.h"

@ -44,8 +44,8 @@
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/iomgr_fwd.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/resolver/server_address.h"
namespace grpc_core {

@ -118,6 +118,7 @@
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/exec_ctx.h"
@ -126,7 +127,6 @@
#include "src/core/lib/iomgr/sockaddr.h"
#include "src/core/lib/iomgr/socket_utils.h"
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/json/json.h"
#include "src/core/lib/resolver/resolver.h"
#include "src/core/lib/resolver/server_address.h"

@ -57,13 +57,13 @@
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/iomgr_fwd.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/json/json.h"
#include "src/core/lib/json/json_util.h"
#include "src/core/lib/resolver/server_address.h"

@ -50,12 +50,12 @@
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/json/json.h"
#include "src/core/lib/resolver/server_address.h"
#include "src/core/lib/transport/connectivity_state.h"

@ -63,10 +63,10 @@
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/gprpp/unique_type_name.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/json/json.h"
#include "src/core/lib/resolver/server_address.h"
#include "src/core/lib/transport/connectivity_state.h"

@ -79,12 +79,12 @@
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/json/json.h"
#include "src/core/lib/json/json_util.h"
#include "src/core/lib/resolver/resolver_registry.h"

@ -52,9 +52,9 @@
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/json/json.h"
#include "src/core/lib/resolver/server_address.h"
#include "src/core/lib/transport/connectivity_state.h"

@ -21,6 +21,7 @@
#include <memory>
#include <set>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
@ -56,9 +57,9 @@
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/unique_type_name.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/json/json.h"
#include "src/core/lib/matchers/matchers.h"
#include "src/core/lib/resolver/server_address.h"

@ -49,12 +49,12 @@
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/json/json.h"
#include "src/core/lib/resolver/server_address.h"
#include "src/core/lib/transport/connectivity_state.h"

@ -63,9 +63,9 @@
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/json/json.h"
#include "src/core/lib/resolver/resolver.h"
#include "src/core/lib/resolver/resolver_registry.h"

@ -36,7 +36,7 @@
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/resolver/resolver_factory.h"
#include "src/core/lib/resolver/resolver_registry.h"
#include "src/core/lib/resolver/server_address.h"

@ -49,13 +49,13 @@
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/http/httpcli.h"
#include "src/core/lib/http/parser.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/json/json.h"
#include "src/core/lib/resolver/resolver.h"
#include "src/core/lib/resolver/resolver_factory.h"

@ -33,9 +33,9 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/uri/uri_parser.h"
namespace grpc_core {

@ -29,11 +29,11 @@
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/iomgr_fwd.h"
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/resolver/resolver.h"
#include "src/core/lib/resolver/resolver_factory.h"

@ -74,10 +74,10 @@
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/iomgr_fwd.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/resolver/resolver.h"
#include "src/core/lib/resolver/resolver_factory.h"
#include "src/core/lib/resolver/resolver_registry.h"

@ -45,8 +45,8 @@
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/uri/uri_parser.h"
namespace grpc_core {

@ -1,29 +1,45 @@
/*
*
* Copyright 2019 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
//
// Copyright 2019 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#include <grpc/support/port_platform.h>
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include <stdint.h>
#include <atomic>
#include <functional>
#include <memory>
#include <utility>
#include <grpc/support/log.h>
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/mpscq.h"
#include "src/core/lib/gprpp/orphanable.h"
namespace grpc_core {
DebugOnlyTraceFlag grpc_work_serializer_trace(false, "work_serializer");
//
// WorkSerializer::WorkSerializerImpl
//
class WorkSerializer::WorkSerializerImpl : public Orphanable {
public:
void Run(std::function<void()> callback, const DebugLocation& location);

@ -1,36 +1,30 @@
/*
*
* Copyright 2019 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
//
// Copyright 2019 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#ifndef GRPC_CORE_LIB_GPRPP_WORK_SERIALIZER_H
#define GRPC_CORE_LIB_GPRPP_WORK_SERIALIZER_H
#ifndef GRPC_CORE_LIB_IOMGR_WORK_SERIALIZER_H
#define GRPC_CORE_LIB_IOMGR_WORK_SERIALIZER_H
#include <grpc/support/port_platform.h>
#include <atomic>
#include <functional>
#include "absl/synchronization/mutex.h"
#include "absl/base/thread_annotations.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/mpscq.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/iomgr/exec_ctx.h"
namespace grpc_core {
@ -87,6 +81,6 @@ class ABSL_LOCKABLE WorkSerializer {
OrphanablePtr<WorkSerializerImpl> impl_;
};
} /* namespace grpc_core */
} // namespace grpc_core
#endif /* GRPC_CORE_LIB_IOMGR_WORK_SERIALIZER_H */
#endif // GRPC_CORE_LIB_GPRPP_WORK_SERIALIZER_H

@ -32,7 +32,7 @@
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/gprpp/work_serializer.h"
namespace grpc_core {

@ -496,6 +496,7 @@ CORE_SOURCE_FILES = [
'src/core/lib/gprpp/thd_windows.cc',
'src/core/lib/gprpp/time.cc',
'src/core/lib/gprpp/time_util.cc',
'src/core/lib/gprpp/work_serializer.cc',
'src/core/lib/http/format_request.cc',
'src/core/lib/http/httpcli.cc',
'src/core/lib/http/httpcli_security_connector.cc',
@ -573,7 +574,6 @@ CORE_SOURCE_FILES = [
'src/core/lib/iomgr/wakeup_fd_nospecial.cc',
'src/core/lib/iomgr/wakeup_fd_pipe.cc',
'src/core/lib/iomgr/wakeup_fd_posix.cc',
'src/core/lib/iomgr/work_serializer.cc',
'src/core/lib/json/json_reader.cc',
'src/core/lib/json/json_util.cc',
'src/core/lib/json/json_writer.cc',

@ -32,8 +32,8 @@
#include "src/core/lib/event_engine/event_engine_factory.h"
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/resolver/resolver_registry.h"
#include "src/core/lib/resolver/server_address.h"
#include "test/core/util/test_config.h"

@ -28,7 +28,8 @@
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/resolver/resolver_registry.h"
#include "test/core/util/test_config.h"

@ -33,7 +33,7 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/resolver/resolver_registry.h"
#include "src/core/lib/resolver/server_address.h"
#include "src/core/lib/security/credentials/fake/fake_credentials.h"

@ -27,7 +27,8 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/resolver/resolver_registry.h"
#include "test/core/util/test_config.h"

@ -366,3 +366,21 @@ grpc_cc_test(
"//test/core/util:grpc_suppressions",
],
)
grpc_cc_test(
name = "work_serializer_test",
srcs = ["work_serializer_test.cc"],
exec_properties = LARGE_MACHINE,
external_deps = [
"gtest",
],
language = "C++",
tags = [
"no_windows", # LARGE_MACHINE is not configured for windows RBE
],
deps = [
"//:gpr",
"//:grpc",
"//test/core/util:grpc_test_util",
],
)

@ -16,7 +16,7 @@
*
*/
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include <memory>
#include <thread>

@ -128,24 +128,6 @@ grpc_cc_test(
],
)
grpc_cc_test(
name = "work_serializer_test",
srcs = ["work_serializer_test.cc"],
exec_properties = LARGE_MACHINE,
external_deps = [
"gtest",
],
language = "C++",
tags = [
"no_windows", # LARGE_MACHINE is not configured for windows RBE
],
deps = [
"//:gpr",
"//:grpc",
"//test/core/util:grpc_test_util",
],
)
grpc_cc_test(
name = "resolve_address_using_ares_resolver_posix_test",
srcs = ["resolve_address_posix_test.cc"],

@ -40,10 +40,10 @@
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/thd.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/iomgr.h"
#include "src/core/lib/iomgr/pollset.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/resolver/resolver.h"
#include "src/core/lib/resolver/resolver_registry.h"
#include "test/core/end2end/cq_verifier.h"

@ -50,11 +50,11 @@
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gprpp/host_port.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/work_serializer.h"
#include "src/core/lib/iomgr/executor.h"
#include "src/core/lib/iomgr/iomgr.h"
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/iomgr/socket_utils.h"
#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/resolver/resolver.h"
#include "src/core/lib/resolver/resolver_registry.h"
#include "src/core/lib/resolver/server_address.h"

@ -2044,6 +2044,8 @@ src/core/lib/gprpp/time.h \
src/core/lib/gprpp/time_util.cc \
src/core/lib/gprpp/time_util.h \
src/core/lib/gprpp/unique_type_name.h \
src/core/lib/gprpp/work_serializer.cc \
src/core/lib/gprpp/work_serializer.h \
src/core/lib/http/format_request.cc \
src/core/lib/http/format_request.h \
src/core/lib/http/httpcli.cc \
@ -2188,8 +2190,6 @@ src/core/lib/iomgr/wakeup_fd_pipe.cc \
src/core/lib/iomgr/wakeup_fd_pipe.h \
src/core/lib/iomgr/wakeup_fd_posix.cc \
src/core/lib/iomgr/wakeup_fd_posix.h \
src/core/lib/iomgr/work_serializer.cc \
src/core/lib/iomgr/work_serializer.h \
src/core/lib/json/json.h \
src/core/lib/json/json_reader.cc \
src/core/lib/json/json_util.cc \

@ -1837,6 +1837,8 @@ src/core/lib/gprpp/time.h \
src/core/lib/gprpp/time_util.cc \
src/core/lib/gprpp/time_util.h \
src/core/lib/gprpp/unique_type_name.h \
src/core/lib/gprpp/work_serializer.cc \
src/core/lib/gprpp/work_serializer.h \
src/core/lib/http/format_request.cc \
src/core/lib/http/format_request.h \
src/core/lib/http/httpcli.cc \
@ -1982,8 +1984,6 @@ src/core/lib/iomgr/wakeup_fd_pipe.cc \
src/core/lib/iomgr/wakeup_fd_pipe.h \
src/core/lib/iomgr/wakeup_fd_posix.cc \
src/core/lib/iomgr/wakeup_fd_posix.h \
src/core/lib/iomgr/work_serializer.cc \
src/core/lib/iomgr/work_serializer.h \
src/core/lib/json/json.h \
src/core/lib/json/json_reader.cc \
src/core/lib/json/json_util.cc \

Loading…
Cancel
Save