Skip to content
This repository was archived by the owner on Dec 8, 2021. It is now read-only.

Commit 9574fca

Browse files
authored
refactor!: use BackgroundThreads from common (#1262)
* refactor: use `BackgroundThreads` from `common` fixes #1250 * update API/ABI after rebase
1 parent 4b648a0 commit 9574fca

10 files changed

Lines changed: 4 additions & 243 deletions
-1.73 KB
Binary file not shown.

google/cloud/spanner/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ configure_file(version_info.h.in ${CMAKE_CURRENT_SOURCE_DIR}/version_info.h)
9797
add_library(
9898
spanner_client
9999
${CMAKE_CURRENT_BINARY_DIR}/internal/build_info.cc
100-
background_threads.h
101100
backoff_policy.h
102101
batch_dml_result.h
103102
bytes.cc
@@ -126,8 +125,6 @@ add_library(
126125
instance_admin_connection.h
127126
internal/api_client_header.cc
128127
internal/api_client_header.h
129-
internal/background_threads_impl.cc
130-
internal/background_threads_impl.h
131128
internal/build_info.h
132129
internal/compiler_info.cc
133130
internal/compiler_info.h
@@ -314,7 +311,6 @@ function (spanner_client_define_tests)
314311
instance_admin_connection_test.cc
315312
instance_test.cc
316313
internal/api_client_header_test.cc
317-
internal/background_threads_test.cc
318314
internal/build_info_test.cc
319315
internal/compiler_info_test.cc
320316
internal/connection_impl_test.cc

google/cloud/spanner/background_threads.h

Lines changed: 0 additions & 42 deletions
This file was deleted.

google/cloud/spanner/connection_options.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
// limitations under the License.
1414

1515
#include "google/cloud/spanner/connection_options.h"
16-
#include "google/cloud/spanner/internal/background_threads_impl.h"
1716
#include "google/cloud/spanner/internal/compiler_info.h"
17+
#include "google/cloud/internal/background_threads_impl.h"
1818
#include "google/cloud/internal/getenv.h"
1919
#include "google/cloud/log.h"
2020
#include <sstream>
@@ -39,7 +39,7 @@ ConnectionOptions::ConnectionOptions(
3939
user_agent_prefix_(internal::BaseUserAgentPrefix()),
4040
background_threads_factory_([] {
4141
return google::cloud::internal::make_unique<
42-
internal::AutomaticallyCreatedBackgroundThreads>();
42+
google::cloud::internal::AutomaticallyCreatedBackgroundThreads>();
4343
}) {
4444
auto tracing =
4545
google::cloud::internal::GetEnv("GOOGLE_CLOUD_CPP_ENABLE_TRACING");
@@ -85,7 +85,7 @@ ConnectionOptions& ConnectionOptions::DisableBackgroundThreads(
8585
google::cloud::grpc_utils::CompletionQueue const& cq) {
8686
background_threads_factory_ = [cq] {
8787
return google::cloud::internal::make_unique<
88-
internal::CustomerSuppliedBackgroundThreads>(cq);
88+
google::cloud::internal::CustomerSuppliedBackgroundThreads>(cq);
8989
};
9090
return *this;
9191
}

google/cloud/spanner/connection_options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
#ifndef GOOGLE_CLOUD_CPP_SPANNER_GOOGLE_CLOUD_SPANNER_CONNECTION_OPTIONS_H
1616
#define GOOGLE_CLOUD_CPP_SPANNER_GOOGLE_CLOUD_SPANNER_CONNECTION_OPTIONS_H
1717

18-
#include "google/cloud/spanner/background_threads.h"
1918
#include "google/cloud/spanner/tracing_options.h"
2019
#include "google/cloud/spanner/version.h"
20+
#include "google/cloud/background_threads.h"
2121
#include "google/cloud/grpc_utils/completion_queue.h"
2222
#include "google/cloud/status_or.h"
2323
#include <google/spanner/admin/database/v1/spanner_database_admin.grpc.pb.h>

google/cloud/spanner/internal/background_threads_impl.cc

Lines changed: 0 additions & 40 deletions
This file was deleted.

google/cloud/spanner/internal/background_threads_impl.h

Lines changed: 0 additions & 61 deletions
This file was deleted.

google/cloud/spanner/internal/background_threads_test.cc

Lines changed: 0 additions & 88 deletions
This file was deleted.

google/cloud/spanner/spanner_client.bzl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"""Automatically generated source lists for spanner_client - DO NOT EDIT."""
1818

1919
spanner_client_hdrs = [
20-
"background_threads.h",
2120
"backoff_policy.h",
2221
"batch_dml_result.h",
2322
"bytes.h",
@@ -35,7 +34,6 @@ spanner_client_hdrs = [
3534
"instance_admin_client.h",
3635
"instance_admin_connection.h",
3736
"internal/api_client_header.h",
38-
"internal/background_threads_impl.h",
3937
"internal/build_info.h",
4038
"internal/compiler_info.h",
4139
"internal/connection_impl.h",
@@ -98,7 +96,6 @@ spanner_client_srcs = [
9896
"instance_admin_client.cc",
9997
"instance_admin_connection.cc",
10098
"internal/api_client_header.cc",
101-
"internal/background_threads_impl.cc",
10299
"internal/compiler_info.cc",
103100
"internal/connection_impl.cc",
104101
"internal/database_admin_logging.cc",

google/cloud/spanner/spanner_client_unit_tests.bzl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ spanner_client_unit_tests = [
2727
"instance_admin_connection_test.cc",
2828
"instance_test.cc",
2929
"internal/api_client_header_test.cc",
30-
"internal/background_threads_test.cc",
3130
"internal/build_info_test.cc",
3231
"internal/compiler_info_test.cc",
3332
"internal/connection_impl_test.cc",

0 commit comments

Comments
 (0)