From 5410446ade40493d17f7e2d7f0d687b0998acc6a Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期三, 27 一月 2021 11:56:54 +0800
Subject: [PATCH] timeout wait 合一
---
test_socket/bus_test.cpp | 17 -----------------
1 files changed, 0 insertions(+), 17 deletions(-)
diff --git a/test_socket/bus_test.cpp b/test_socket/bus_test.cpp
index b35e086..8d630b6 100644
--- a/test_socket/bus_test.cpp
+++ b/test_socket/bus_test.cpp
@@ -32,7 +32,6 @@
int rv;
ShmModSocket *sk = (ShmModSocket *)skptr;
-printf("run_recv\n");
struct timespec timeout = {2, 0};
while (true) {
printf("run_recv before\n");
@@ -50,20 +49,6 @@
return NULL;
}
-
-void *run_recv2(void *skptr) {
- pthread_detach(pthread_self());
- while(true) {
- logger->debug("================run_recv\n");
- // sleep(1);
- }
-}
-
-void client2(int key) {
- ShmModSocket *sk = new ShmModSocket();
- run_recv((void *)sk);
-}
-
void client(int key) {
ShmModSocket *sk = new ShmModSocket();
@@ -84,10 +69,8 @@
while (true) {
//printf("Usage: pub <topic> [content] or sub <topic>\n");
printf("Can I help you? sub, pub, desub or quit %d\n", i++);
- printf("client 1\n");
// scanf("%s", action);
std::cin >> action;
- printf("client 2\n");
if(strcmp(action, "sub") == 0) {
printf("Please input topic!\n");
scanf("%s", topic);
--
Gitblit v1.8.0