Shabbos 30 – שבת ל

The Gemara relates that the Malach Hamaves couldn’t approach Dovid Hamelech who was learning Torah continuously.  Why couldn’t he approach while he would tend to personal needs?

Dovid Hamelech was told by Hashem that he was destined to die on Shabbos.  If so what was the purpose of learning uninterrupted; since it was already pre-determined?