Frequent signal interrupts in xfer handler when busy
Problem
The problem is that SIGALRM
is used internally to notify thread after state update.
Reason is that it should interrupt I/O and let thread reflect the change, like when interface changes etc. But thread state is also updated when enqueuing a new xfer task, so the thread can take up on it as soon as possible.
Solutions
We can either:
- Do not issue
SIGALRM
on state update and let the threads finish I/O, but we must not usepoll
without reasonable timeout - Busy-loop
send
calls until the response is sent or ends with an error different fromEINTR
,recv
must not be busy looped, but it should return 0 bytes read if interrupted and attempt on the next try