Thank you for giving comments! I'll post new patches later.
> +#define HOLD_CHECKING_REMOTE_SERVERS_INTERRUPTS() (CheckingRemoteServersHoldoffCount++) > > The macro contains only one operation. Can the macro be removed (with `CheckingRemoteServersHoldoffCount++` inlined) ?
Hmm, these HOLD/RESUME macros are followed HOLD_INTERRUPUST() and HOLD_CANCEL_INTERRUPTS():
So I want to keep the current style. Could you tell me if you have any other reasons?
> + if (CheckingRemoteServersTimeoutPending && CheckingRemoteServersHoldoffCount != 0) > + { > + /* > + * Skip checking foreign servers while reading messages. > + */ > + InterruptPending = true; > + } > + else if (CheckingRemoteServersTimeoutPending) > > Would the code be more readable if the above two if blocks be moved inside one enclosing if block (factoring the common condition)? > > + if (CheckingRemoteServersTimeoutPending)