aboutsummaryrefslogtreecommitdiffstats
path: root/fnet/src/examples
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 /fnet/src/examples
parent890e0ac9e795ca1c95e459f98a54593ac151051c (diff)
untangle fnet from fastos
Diffstat (limited to 'fnet/src/examples')
-rw-r--r--fnet/src/examples/ping/pingclient.cpp5
-rw-r--r--fnet/src/examples/timeout/timeout.cpp5
2 files changed, 2 insertions, 8 deletions
diff --git a/fnet/src/examples/ping/pingclient.cpp b/fnet/src/examples/ping/pingclient.cpp
index 9b32e40ac83..43296df7e57 100644
--- a/fnet/src/examples/ping/pingclient.cpp
+++ b/fnet/src/examples/ping/pingclient.cpp
@@ -6,7 +6,6 @@
#include <vespa/fnet/connection.h>
#include <examples/ping/packets.h>
#include <vespa/vespalib/util/signalhandler.h>
-#include <vespa/fastos/thread.h>
#include <vespa/log/log.h>
LOG_SETUP("pingclient");
@@ -28,7 +27,6 @@ PingClient::main(int argc, char **argv)
}
FNET_PacketQueue queue;
- FastOS_ThreadPool pool;
PingPacketFactory factory;
FNET_SimplePacketStreamer streamer(&factory);
FNET_Transport transport;
@@ -39,7 +37,7 @@ PingClient::main(int argc, char **argv)
if (argc == 3) {
timeout_ms = atof(argv[2]) * 1000;
}
- transport.Start(&pool);
+ transport.Start();
uint32_t channelCnt = 0;
for (uint32_t i = 0; i < 10; i++) {
@@ -90,7 +88,6 @@ PingClient::main(int argc, char **argv)
if (conn != nullptr)
conn->SubRef();
transport.ShutDown(true);
- pool.Close();
return 0;
}
diff --git a/fnet/src/examples/timeout/timeout.cpp b/fnet/src/examples/timeout/timeout.cpp
index 41de852d48c..e0830c7cde1 100644
--- a/fnet/src/examples/timeout/timeout.cpp
+++ b/fnet/src/examples/timeout/timeout.cpp
@@ -5,7 +5,6 @@
#include <vespa/fnet/packetqueue.h>
#include <vespa/fnet/controlpacket.h>
#include <vespa/vespalib/util/signalhandler.h>
-#include <vespa/fastos/thread.h>
#include <vespa/vespalib/util/time.h>
#include <thread>
@@ -54,10 +53,9 @@ MyApp::main(int, char **)
ms_double ms;
clock::time_point t;
FNET_PacketQueue queue;
- FastOS_ThreadPool pool;
FNET_Transport transport;
Timeout timeout(transport.GetScheduler(), &queue);
- transport.Start(&pool);
+ transport.Start();
// stable-state operation
std::this_thread::sleep_for(100ms);
@@ -90,7 +88,6 @@ MyApp::main(int, char **)
fprintf(stderr, "time since timeout was scheduled: %f ms\n", ms.count());
transport.ShutDown(true);
- pool.Close();
return 0;
}