Deadlock in threads
Deadlock occurs when two
threads have a circular dependency on a pair of synchronized objects. Suppose,
Thread A is having lock on Object X and Thread B is having lock on Object Y.
Now, A won’t release X until it gets Y and B won’t release Y until it gets a
hold on object X so a deadlock situation arises.
No comments:
Post a Comment