ただめんどうなので今回のように止めたいだけならこういう簡易的なやりかたがある
ttps://stackoverflow.com/questions/21294713/non-blocking-i-o-in-c-windows