It is an interesting subject, especially in America. We have always used humor as a shield and I have to admit that for me personally there aren't many limits.
I remember that on 9/11 I was at work and within an hour a joke popped into my thoughts;
"What do you call a jihadist who waits until they are over 30 to martyr,,,,,,,, a late boomer."
It just popped up in there, I didn't try to think of it, didn't really want it but there it was.
Now I obviously didn't jump right up and share this with anyone other than a few friends who already know that I am a bit macabre,,, OK sick.
But the question about just how long is it before something is funny is a good one. 20 years is a common answer used in numerous comedic circles, but they are of course joking.
It all depends on how sensitive the audience is.
There were Donner Party jokes the following winter, Indian jokes on the way back to the fort.
I worked in a cemetery when I was young and we told jokes as we dug the holes, more as we filled them. Don't even get me started on crematorium humor! And exhumations; if the smell didn't get to you the jokes usually did.
It is not that we are all sick twisted jerks without feelings; it is a way to cope with cold reality. It is a defensive reaction to things your mind either can not or will not deal with.