1
0
Fork 0
mirror of https://git.wownero.com/wownero/wownero.git synced 2024-08-15 01:03:23 +00:00

readline_buffer: fix busy wait

It'd eat up a core constantly, due to spending its time jumping
back and forth between userland and kernel. We now wait for up
to a millisecond in kernel, which will be transparent to the user
and drop to idle most of the time.
This commit is contained in:
moneromooo-monero 2017-06-23 13:21:50 +01:00
parent ae8841f2ab
commit 8261ba69e6
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -122,7 +122,7 @@ static int process_input()
struct timeval t;
t.tv_sec = 0;
t.tv_usec = 0;
t.tv_usec = 1000;
FD_ZERO(&fds);
FD_SET(STDIN_FILENO, &fds);