www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Time limit exceptions (hang time): progress?

I haven't heard much beyond "yes, this would be great to have" and a few 
code suggestions on how to implement it.  At the same time, I'm 
definitely having second thoughts about the idea.  How can you tell the 
difference between a hang and an operation that's just working hard?

Just to give an example, say you set a watch for hanging on function 
A().  A() calls B(), which calls C(), which calls D(), which calls... 
all legitimate function calls.  (In some applications, this is the norm. 
  When Mozilla crashes, for example, the stack is usually forty 
functions deep.)  P() is chugging along when time runs out on A(), and 
we throw a time limit exception.

Is this something that would really fit in the language?  D didn't have 
any sort of time-based syntax in it natively, and I wonder if this is 
deliberate.
Oct 06 2004