Have been testing this for a few weeks now - in my experience it helps to avoid moments during IBD where the best chain activation causes download to stop (due to the window being emptied, as no further blocks are being requested while the message handler thread is on hold while waiting for the chain to finish activating) - this becomes especially important with other changes I am testing where the MAX_BLOCKS_IN_FLIGHT_PER_PEER is significantly reduced (based upon bandwidth of each host).
I might have omitted some locks that need to be used here - and also might be able to incorporate this code into existing files rather than needing new ones - but it is certainly ready enough for a proof of concept I think.
Also possible improvements might be to use signals to break out of the sleep (as was done in 351593b9c8687b4da2e86769899b8b61ea44b630), although during IBD I don’t think the saving of 100ms is critical.