▲ | thomashabets2 4 days ago | |
The standard library recovers from the panic, and program continues. This means that if you do:
And `get_something()` panics, then the program continues with a locked mutex. There are more dangerous things than a deadlocked program, of course.It's non-optional to use defer, and thus write exception safe code. Even if you never use exceptions. |