diff --git a/BUILD b/BUILD
index fc06a3eb07b..8032bed4641 100644
--- a/BUILD
+++ b/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",
],
)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2cfda948510..50387d9ffa1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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
)
diff --git a/Makefile b/Makefile
index a002c1dbba8..e15804482f6 100644
--- a/Makefile
+++ b/Makefile
@@ -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 \
diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml
index 7d5a7f5c603..ef6a0ed944c 100644
--- a/build_autogenerated.yaml
+++ b/build_autogenerated.yaml
@@ -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:
diff --git a/config.m4 b/config.m4
index d8f8ed0bdd8..bb50d377670 100644
--- a/config.m4
+++ b/config.m4
@@ -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 \
diff --git a/config.w32 b/config.w32
index 1504b4d95d2..a6d86ef2bcd 100644
--- a/config.w32
+++ b/config.w32
@@ -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 " +
diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec
index 5990590afb3..15ad4a2d9e0 100644
--- a/gRPC-C++.podspec
+++ b/gRPC-C++.podspec
@@ -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',
diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec
index 4d0e4adc162..59ff635ea6b 100644
--- a/gRPC-Core.podspec
+++ b/gRPC-Core.podspec
@@ -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',
diff --git a/grpc.gemspec b/grpc.gemspec
index afa71984240..86c229985a9 100644
--- a/grpc.gemspec
+++ b/grpc.gemspec
@@ -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 )
diff --git a/grpc.gyp b/grpc.gyp
index bb6edf3cedb..d0f36e5e91e 100644
--- a/grpc.gyp
+++ b/grpc.gyp
@@ -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',
diff --git a/package.xml b/package.xml
index 0d98663ac18..4c0240ecd4d 100644
--- a/package.xml
+++ b/package.xml
@@ -1043,6 +1043,8 @@
+
+
@@ -1187,8 +1189,6 @@
-
-
diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc
index d68658f141f..719e6abbaa3 100644
--- a/src/core/ext/filters/client_channel/client_channel.cc
+++ b/src/core/ext/filters/client_channel/client_channel.cc
@@ -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"
diff --git a/src/core/ext/filters/client_channel/client_channel.h b/src/core/ext/filters/client_channel/client_channel.h
index 415ea0c9148..b7661fdf81b 100644
--- a/src/core/ext/filters/client_channel/client_channel.h
+++ b/src/core/ext/filters/client_channel/client_channel.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"
diff --git a/src/core/ext/filters/client_channel/lb_policy.h b/src/core/ext/filters/client_channel/lb_policy.h
index f1bca9acc5c..689a409c2c2 100644
--- a/src/core/ext/filters/client_channel/lb_policy.h
+++ b/src/core/ext/filters/client_channel/lb_policy.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 {
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
index 000e4f35a02..3570fe46450 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
@@ -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"
diff --git a/src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc b/src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc
index 1c40978a2fc..c1b5a23a14b 100644
--- a/src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc
@@ -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"
diff --git a/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc b/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc
index 2ba91df9382..778de9c4560 100644
--- a/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc
@@ -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"
diff --git a/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc b/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc
index eccde02672a..fd25d8f4163 100644
--- a/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc
@@ -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"
diff --git a/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc b/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc
index 2d18f1053c3..94a57cfe215 100644
--- a/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc
@@ -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"
diff --git a/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc b/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc
index 57298dc6164..7feb8e50989 100644
--- a/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc
@@ -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"
diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc b/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc
index 104c8cb1242..828c9ff201b 100644
--- a/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc
@@ -21,6 +21,7 @@
#include
#include
#include
+#include
#include
#include
@@ -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"
diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc b/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc
index 0c4ecd07b23..daa07d156ef 100644
--- a/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc
@@ -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"
diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc b/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc
index 4efad19bbc2..983cfc1f3ef 100644
--- a/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc
@@ -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"
diff --git a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
index 650886e51d5..2a3144e77bf 100644
--- a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
+++ b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
@@ -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"
diff --git a/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc b/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc
index bbf0ce9805b..1710e7ff5b4 100644
--- a/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc
+++ b/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc
@@ -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"
diff --git a/src/core/ext/filters/client_channel/resolver/polling_resolver.cc b/src/core/ext/filters/client_channel/resolver/polling_resolver.cc
index 745eb76b826..9b4863f85cf 100644
--- a/src/core/ext/filters/client_channel/resolver/polling_resolver.cc
+++ b/src/core/ext/filters/client_channel/resolver/polling_resolver.cc
@@ -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 {
diff --git a/src/core/ext/filters/client_channel/resolver/polling_resolver.h b/src/core/ext/filters/client_channel/resolver/polling_resolver.h
index 4626d71f21a..9a2528c96f1 100644
--- a/src/core/ext/filters/client_channel/resolver/polling_resolver.h
+++ b/src/core/ext/filters/client_channel/resolver/polling_resolver.h
@@ -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"
diff --git a/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc b/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc
index 0b40d0bfd4c..1c1b58d75c9 100644
--- a/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc
+++ b/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc
@@ -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"
diff --git a/src/core/ext/xds/xds_client.h b/src/core/ext/xds/xds_client.h
index 5818b47285c..a5130fe5777 100644
--- a/src/core/ext/xds/xds_client.h
+++ b/src/core/ext/xds/xds_client.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 {
diff --git a/src/core/lib/iomgr/work_serializer.cc b/src/core/lib/gprpp/work_serializer.cc
similarity index 89%
rename from src/core/lib/iomgr/work_serializer.cc
rename to src/core/lib/gprpp/work_serializer.cc
index ac98962babd..56fa6cce427 100644
--- a/src/core/lib/iomgr/work_serializer.cc
+++ b/src/core/lib/gprpp/work_serializer.cc
@@ -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
-#include "src/core/lib/iomgr/work_serializer.h"
+#include "src/core/lib/gprpp/work_serializer.h"
+
+#include
+
+#include
+#include
+#include
+#include
+
+#include
+
+#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 callback, const DebugLocation& location);
diff --git a/src/core/lib/iomgr/work_serializer.h b/src/core/lib/gprpp/work_serializer.h
similarity index 73%
rename from src/core/lib/iomgr/work_serializer.h
rename to src/core/lib/gprpp/work_serializer.h
index 34749242733..8e654dded7b 100644
--- a/src/core/lib/iomgr/work_serializer.h
+++ b/src/core/lib/gprpp/work_serializer.h
@@ -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
-#include
#include
-#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 impl_;
};
-} /* namespace grpc_core */
+} // namespace grpc_core
-#endif /* GRPC_CORE_LIB_IOMGR_WORK_SERIALIZER_H */
+#endif // GRPC_CORE_LIB_GPRPP_WORK_SERIALIZER_H
diff --git a/src/core/lib/transport/connectivity_state.h b/src/core/lib/transport/connectivity_state.h
index 528c615f1b7..a30d8bcf0a9 100644
--- a/src/core/lib/transport/connectivity_state.h
+++ b/src/core/lib/transport/connectivity_state.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 {
diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py
index a00678284ea..6ff0742ea09 100644
--- a/src/python/grpcio/grpc_core_dependencies.py
+++ b/src/python/grpcio/grpc_core_dependencies.py
@@ -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',
diff --git a/test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc b/test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc
index 1c77377c564..7179026612b 100644
--- a/test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc
+++ b/test/core/client_channel/resolvers/dns_resolver_cooldown_test.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"
diff --git a/test/core/client_channel/resolvers/dns_resolver_test.cc b/test/core/client_channel/resolvers/dns_resolver_test.cc
index 6e676d407cc..48ecfaf9e4c 100644
--- a/test/core/client_channel/resolvers/dns_resolver_test.cc
+++ b/test/core/client_channel/resolvers/dns_resolver_test.cc
@@ -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"
diff --git a/test/core/client_channel/resolvers/fake_resolver_test.cc b/test/core/client_channel/resolvers/fake_resolver_test.cc
index 385601a9c3a..ef6bf857243 100644
--- a/test/core/client_channel/resolvers/fake_resolver_test.cc
+++ b/test/core/client_channel/resolvers/fake_resolver_test.cc
@@ -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"
diff --git a/test/core/client_channel/resolvers/sockaddr_resolver_test.cc b/test/core/client_channel/resolvers/sockaddr_resolver_test.cc
index d4cbabd40ec..52c02f823a3 100644
--- a/test/core/client_channel/resolvers/sockaddr_resolver_test.cc
+++ b/test/core/client_channel/resolvers/sockaddr_resolver_test.cc
@@ -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"
diff --git a/test/core/gprpp/BUILD b/test/core/gprpp/BUILD
index 872ef01d619..4d90ba14ec7 100644
--- a/test/core/gprpp/BUILD
+++ b/test/core/gprpp/BUILD
@@ -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",
+ ],
+)
diff --git a/test/core/iomgr/work_serializer_test.cc b/test/core/gprpp/work_serializer_test.cc
similarity index 99%
rename from test/core/iomgr/work_serializer_test.cc
rename to test/core/gprpp/work_serializer_test.cc
index f729c086817..5852d37cbee 100644
--- a/test/core/iomgr/work_serializer_test.cc
+++ b/test/core/gprpp/work_serializer_test.cc
@@ -16,7 +16,7 @@
*
*/
-#include "src/core/lib/iomgr/work_serializer.h"
+#include "src/core/lib/gprpp/work_serializer.h"
#include
#include
diff --git a/test/core/iomgr/BUILD b/test/core/iomgr/BUILD
index 56351e5ed7a..9e8820bb50b 100644
--- a/test/core/iomgr/BUILD
+++ b/test/core/iomgr/BUILD
@@ -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"],
diff --git a/test/cpp/naming/cancel_ares_query_test.cc b/test/cpp/naming/cancel_ares_query_test.cc
index 4ce4fe130cf..87d6a636076 100644
--- a/test/cpp/naming/cancel_ares_query_test.cc
+++ b/test/cpp/naming/cancel_ares_query_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"
diff --git a/test/cpp/naming/resolver_component_test.cc b/test/cpp/naming/resolver_component_test.cc
index 687ac4d82b9..bf0c768e20a 100644
--- a/test/cpp/naming/resolver_component_test.cc
+++ b/test/cpp/naming/resolver_component_test.cc
@@ -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"
diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal
index 9215aaed7d7..c0813f8e12b 100644
--- a/tools/doxygen/Doxyfile.c++.internal
+++ b/tools/doxygen/Doxyfile.c++.internal
@@ -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 \
diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal
index 7a8d81f5231..47f346130f1 100644
--- a/tools/doxygen/Doxyfile.core.internal
+++ b/tools/doxygen/Doxyfile.core.internal
@@ -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 \