How large of an asteroid or comet could impact the Earth WITHOUT threatening the extinction of humans?
Asteroid: Lower speeds, can easily be 500m large without becoming a global killer. 1 to 20 km is debatable (it also matters on density of the asteroid and impact velocity), everything past 20 km will have serious effects. Your example would create a 159 km crater in the worst case, it would sure create a nuclear winter effect, and ejecta would rain on you even in 1000 km distance. Comet: Very high speeds, even a small comet will cause serious damage. The largest comet has 70 km diameter, typical is around 5-10 km. A 5 km comet would cause a 70 km crater, a 70 km comet a 750 km crater. Luckily both your example and a small comet impact happen statistically only every 20 million years.