We're more likely to end up blowing ourselves to bits before the sun. But maybe we could be a little more optimistic about it. Who knows maybe civilized society won't end up destroying itself and we'll eventually make super-advanced technology to conquer the threat of imploding suns and black holes. Yes it's very far-fetched, but none of us would be here anyway, so why worry about it?