summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@yahooinc.com>2023-02-22 12:54:31 +0000
committerHåvard Pettersen <havardpe@yahooinc.com>2023-02-22 14:46:14 +0000
commitb6073079e7d0d09fb7f13606d3fe3f1798337d66 (patch)
tree70998a611bdb7af626e8f480e34062db7783c2ea /config
parent890e0ac9e795ca1c95e459f98a54593ac151051c (diff)
untangle fnet from fastos
Diffstat (limited to 'config')
-rw-r--r--config/src/tests/file_acquirer/file_acquirer_test.cpp4
-rw-r--r--config/src/tests/frtconnectionpool/frtconnectionpool.cpp5
-rw-r--r--config/src/vespa/config/frt/frtconnectionpool.cpp10
-rw-r--r--config/src/vespa/config/frt/frtconnectionpool.h5
-rw-r--r--config/src/vespa/config/subscription/sourcespec.cpp3
5 files changed, 8 insertions, 19 deletions
diff --git a/config/src/tests/file_acquirer/file_acquirer_test.cpp b/config/src/tests/file_acquirer/file_acquirer_test.cpp
index 8449a33a782..8e11f964f16 100644
--- a/config/src/tests/file_acquirer/file_acquirer_test.cpp
+++ b/config/src/tests/file_acquirer/file_acquirer_test.cpp
@@ -11,7 +11,6 @@ using namespace config;
struct ServerFixture : FRT_Invokable {
fnet::frt::StandaloneFRT server;
- FastOS_ThreadPool threadPool;
FNET_Transport transport;
FRT_Supervisor &orb;
vespalib::string spec;
@@ -26,14 +25,13 @@ struct ServerFixture : FRT_Invokable {
ServerFixture()
: server(),
- threadPool(),
transport(),
orb(server.supervisor())
{
init_rpc();
orb.Listen(0);
spec = vespalib::make_string("tcp/localhost:%d", orb.GetListenPort());
- transport.Start(&threadPool);
+ transport.Start();
}
void RPC_waitFor(FRT_RPCRequest *req) {
diff --git a/config/src/tests/frtconnectionpool/frtconnectionpool.cpp b/config/src/tests/frtconnectionpool/frtconnectionpool.cpp
index 9c3498a92a1..834b1797ed0 100644
--- a/config/src/tests/frtconnectionpool/frtconnectionpool.cpp
+++ b/config/src/tests/frtconnectionpool/frtconnectionpool.cpp
@@ -4,7 +4,6 @@
#include <vespa/config/frt/frtconnectionpool.h>
#include <vespa/fnet/frt/error.h>
#include <vespa/fnet/transport.h>
-#include <vespa/fastos/thread.h>
#include <sstream>
#include <set>
#include <unistd.h>
@@ -14,7 +13,6 @@ using namespace config;
class Test : public vespalib::TestApp {
private:
static ServerSpec::HostSpecList _sources;
- FastOS_ThreadPool _threadPool;
FNET_Transport _transport;
void verifyAllSourcesInRotation(FRTConnectionPool& sourcePool);
public:
@@ -33,10 +31,9 @@ public:
Test::Test()
: vespalib::TestApp(),
- _threadPool(),
_transport()
{
- _transport.Start(&_threadPool);
+ _transport.Start();
}
Test::~Test() {
diff --git a/config/src/vespa/config/frt/frtconnectionpool.cpp b/config/src/vespa/config/frt/frtconnectionpool.cpp
index 21d6f0dbe90..de00c650628 100644
--- a/config/src/vespa/config/frt/frtconnectionpool.cpp
+++ b/config/src/vespa/config/frt/frtconnectionpool.cpp
@@ -167,14 +167,12 @@ FRTConnectionPool::getScheduler() {
return _supervisor->GetScheduler();
}
-FRTConnectionPoolWithTransport::FRTConnectionPoolWithTransport(std::unique_ptr<FastOS_ThreadPool> threadPool,
- std::unique_ptr<FNET_Transport> transport,
+FRTConnectionPoolWithTransport::FRTConnectionPoolWithTransport(std::unique_ptr<FNET_Transport> transport,
const ServerSpec & spec, const TimingValues & timingValues)
- : _threadPool(std::move(threadPool)),
- _transport(std::move(transport)),
- _connectionPool(std::make_unique<FRTConnectionPool>(*_transport, spec, timingValues))
+ : _transport(std::move(transport)),
+ _connectionPool(std::make_unique<FRTConnectionPool>(*_transport, spec, timingValues))
{
- _transport->Start(_threadPool.get());
+ _transport->Start();
}
FRTConnectionPoolWithTransport::~FRTConnectionPoolWithTransport()
diff --git a/config/src/vespa/config/frt/frtconnectionpool.h b/config/src/vespa/config/frt/frtconnectionpool.h
index 564c6506159..5d97f2ae338 100644
--- a/config/src/vespa/config/frt/frtconnectionpool.h
+++ b/config/src/vespa/config/frt/frtconnectionpool.h
@@ -8,7 +8,6 @@
#include <map>
class FNET_Transport;
-class FastOS_ThreadPool;
namespace config {
@@ -103,8 +102,7 @@ public:
class FRTConnectionPoolWithTransport : public ConnectionFactory {
public:
- FRTConnectionPoolWithTransport(std::unique_ptr<FastOS_ThreadPool> threadPool,
- std::unique_ptr<FNET_Transport> transport,
+ FRTConnectionPoolWithTransport(std::unique_ptr<FNET_Transport> transport,
const ServerSpec & spec, const TimingValues & timingValues);
FRTConnectionPoolWithTransport(const FRTConnectionPoolWithTransport&) = delete;
FRTConnectionPoolWithTransport& operator=(const FRTConnectionPoolWithTransport&) = delete;
@@ -113,7 +111,6 @@ public:
void syncTransport() override { _connectionPool->syncTransport(); }
Connection* getCurrent() override { return _connectionPool->getCurrent(); }
private:
- std::unique_ptr<FastOS_ThreadPool> _threadPool;
std::unique_ptr<FNET_Transport> _transport;
std::unique_ptr<FRTConnectionPool> _connectionPool;
};
diff --git a/config/src/vespa/config/subscription/sourcespec.cpp b/config/src/vespa/config/subscription/sourcespec.cpp
index c05f639f9ba..0bdcf2acbc5 100644
--- a/config/src/vespa/config/subscription/sourcespec.cpp
+++ b/config/src/vespa/config/subscription/sourcespec.cpp
@@ -127,8 +127,7 @@ ServerSpec::createSourceFactory(const TimingValues & timingValues) const
{
const auto vespaVersion = VespaVersion::getCurrentVersion();
return std::make_unique<FRTSourceFactory>(
- std::make_unique<FRTConnectionPoolWithTransport>(std::make_unique<FastOS_ThreadPool>(),
- std::make_unique<FNET_Transport>(),
+ std::make_unique<FRTConnectionPoolWithTransport>(std::make_unique<FNET_Transport>(),
*this, timingValues),
timingValues, _traceLevel, vespaVersion, _compressionType);
}