What is a deadlock?

Threads And Concurrency Questions



48 Short 41 Medium 46 Long Answer Questions Question Index

What is a deadlock?

A deadlock is a situation in concurrent programming where two or more threads are unable to proceed because each is waiting for a resource that is held by another thread in the same set. As a result, the threads are stuck in a state of waiting indefinitely, leading to a halt in the execution of the program.