Under what circumstances is a dead end a good thing?

What is an example of when a deadlock is beneficial?

+4
source share
5 answers

If the program you are locking is a virus?

If you want to freeze the process, I suppose this will be the only time you have to do this ... lol.

+4
source

This is useful because it clearly shows you that your code is faulty and your synchronization methods need to be reviewed.

+2
source

here is an example of using db stub in mysql. This is more of a hack than a generalized advantage of dead ends, but it is the only thing I have ever met that involves creating a deadlock for a beneficial effect other than training goals and for testing automated detection methods (which, in the opinion of some, can be both useful, but when the benefits come from helping to avoid future deadlocks, so they are useful in the same sense as for studying a deadly disease in the laboratory).

+2
source

A dead end is never profitable. This is a huge problem in the program because it causes the program to freeze under the circumstances!

0
source

A dead end is never profitable. This occurs when one or more processes are blocked forever due to requirements that cannot be satisfied. This, as a rule, leads to the fact that the program freezes, as the processes will not continue if the deadlock is not blocked. Programs must be created specifically to prevent blockages in all cases.

0
source

Source: https://habr.com/ru/post/1340874/


All Articles