sorting associative array's keys by values
Era Scarecrow
rtcvb32 at yahoo.com
Mon Jun 18 12:39:54 PDT 2012
On Monday, 18 June 2012 at 13:22:24 UTC, maarten van damme wrote:
> and something I forgot to ask, is it a conscious decision to
> not print out fired asserts in treads? Normally when an assert
> fails my whole program crashes and I can see what went wrong.
> With treads however, it quietly dies.
Be horrible if a kernel died due to a program's assert and
throws wouldn't it? Since all programs are effectively threads or
separate processes. Since a thread is just a branch of the main
program, it can only go up the stack as much as it's stack is
present (or that's how I see it working).
I haven't done thread programming yet, but sometimes when using
VisualD when it breaks due to an assert it wouldn't give any
detailed information. In those cases I used a try/catch...
void threadedFunction(){
//global try/catch
try {
//your function code
} catch(Throwable o) {
writeln(o);
//still dies afterwards
}
}
More information about the Digitalmars-d-learn
mailing list