From: Matt Corallo Date: Wed, 16 Mar 2022 18:49:21 +0000 (+0000) Subject: Sleep slightly longer when polling X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=21295bd84d4089d71b5aa39af3325b1ceeaff99a;p=tunudptotcp Sleep slightly longer when polling --- diff --git a/main.cpp b/main.cpp index c5e73e2..e070706 100644 --- a/main.cpp +++ b/main.cpp @@ -314,7 +314,7 @@ static uint64_t tcp_init_magic; #define PENDING_MESSAGES_BUFF_SIZE (0x3000) #define PACKET_READ_OFFS (20-16) #define PACKET_READ_SIZE (1500 - PACKET_READ_OFFS) -#define THREAD_POLL_SLEEP_MICS 50 +#define THREAD_POLL_SLEEP_MICS 250 struct MessageQueue { std::tuple, ssize_t> messagesPendingRingBuff[PENDING_MESSAGES_BUFF_SIZE]; std::atomic nextPendingMessage, nextUndefinedMessage;