summaryrefslogtreecommitdiffstats
path: root/fnet
diff options
context:
space:
mode:
Diffstat (limited to 'fnet')
-rw-r--r--fnet/src/examples/frt/rpc/CMakeLists.txt2
-rw-r--r--fnet/src/examples/timeout/timeout.cpp7
-rw-r--r--fnet/src/tests/examples/examples_test.cpp4
-rw-r--r--fnet/src/tests/frt/rpc/detach_return_invoke.cpp2
-rw-r--r--fnet/src/vespa/fnet/frt/invoker.h1
5 files changed, 8 insertions, 8 deletions
diff --git a/fnet/src/examples/frt/rpc/CMakeLists.txt b/fnet/src/examples/frt/rpc/CMakeLists.txt
index 914525a2a57..109284fa222 100644
--- a/fnet/src/examples/frt/rpc/CMakeLists.txt
+++ b/fnet/src/examples/frt/rpc/CMakeLists.txt
@@ -48,7 +48,7 @@ vespa_add_executable(fnet_rpc_callback_client_app
vespa_add_executable(fnet_rpc_invoke_app
SOURCES
rpc_invoke.cpp
- OUTPUT_NAME vespa-rpc-invoke
+ OUTPUT_NAME vespa-rpc-invoke-bin
INSTALL bin
DEPENDS
fnet
diff --git a/fnet/src/examples/timeout/timeout.cpp b/fnet/src/examples/timeout/timeout.cpp
index 1d6ecc11909..23dfbeb9070 100644
--- a/fnet/src/examples/timeout/timeout.cpp
+++ b/fnet/src/examples/timeout/timeout.cpp
@@ -2,7 +2,8 @@
#include <vespa/fnet/fnet.h>
#include <vespa/fastos/app.h>
-#include <chrono>
+#include <vespa/vespalib/util/time.h>
+#include <thread>
#include <vespa/log/log.h>
LOG_SETUP("timeout");
@@ -55,7 +56,7 @@ MyApp::Main()
transport.Start(&pool);
// stable-state operation
- FastOS_Thread::Sleep(500);
+ std::this_thread::sleep_for(500ms);
FNET_Packet *packet;
FNET_Context context;
@@ -64,7 +65,7 @@ MyApp::Main()
t = clock::now();
timeout.Schedule(2.0); // timeout in 2 seconds
- FastOS_Thread::Sleep(1000);
+ std::this_thread::sleep_for(1s);
timeout.Unschedule(); // cancel timeout
ms = (clock::now() - t);
diff --git a/fnet/src/tests/examples/examples_test.cpp b/fnet/src/tests/examples/examples_test.cpp
index 61a2408e39d..c704c58abc9 100644
--- a/fnet/src/tests/examples/examples_test.cpp
+++ b/fnet/src/tests/examples/examples_test.cpp
@@ -75,7 +75,7 @@ TEST("usage") {
EXPECT_FALSE(runProc(proc, done));
}
{
- SlaveProc proc("exec ../../examples/frt/rpc/vespa-rpc-invoke");
+ SlaveProc proc("exec ../../examples/frt/rpc/vespa-rpc-invoke-bin");
EXPECT_FALSE(runProc(proc, done));
}
{
@@ -197,7 +197,7 @@ TEST_MT_F("rpc invoke", 2, std::atomic<bool>()) {
EXPECT_TRUE(runProc(proc, f1));
} else {
TEST_BARRIER();
- EXPECT_TRUE(runProc(vespalib::make_string("exec ../../examples/frt/rpc/vespa-rpc-invoke tcp/localhost:%d frt.rpc.echo "
+ EXPECT_TRUE(runProc(vespalib::make_string("exec ../../examples/frt/rpc/vespa-rpc-invoke-bin tcp/localhost:%d frt.rpc.echo "
"b:1 h:2 i:4 l:8 f:0.5 d:0.25 s:foo",
PORT0).c_str()));
f1 = true;
diff --git a/fnet/src/tests/frt/rpc/detach_return_invoke.cpp b/fnet/src/tests/frt/rpc/detach_return_invoke.cpp
index 43a61cd9bcd..95dbe672909 100644
--- a/fnet/src/tests/frt/rpc/detach_return_invoke.cpp
+++ b/fnet/src/tests/frt/rpc/detach_return_invoke.cpp
@@ -54,7 +54,7 @@ TEST("detach return invoke") {
if (receptor.req != 0) {
break;
}
- FastOS_Thread::Sleep(10);
+ std::this_thread::sleep_for(10ms);
}
req->SubRef();
target->SubRef();
diff --git a/fnet/src/vespa/fnet/frt/invoker.h b/fnet/src/vespa/fnet/frt/invoker.h
index 64adf66688e..0838ef84dd3 100644
--- a/fnet/src/vespa/fnet/frt/invoker.h
+++ b/fnet/src/vespa/fnet/frt/invoker.h
@@ -5,7 +5,6 @@
#include "rpcrequest.h"
#include <vespa/fnet/task.h>
#include <vespa/fnet/ipackethandler.h>
-#include <vespa/fastos/thread.h>
#include <mutex>
#include <condition_variable>