Phạm Công Thành
New member
What is deadlock in multithreading?
Answer
Deadlock can occur in a situation when a thread is waiting for an object lock, that is acquired by another thread and second thread is waiting for an object lock that is acquired by first thread. Since, both threads are waiting for each other to release the lock, the condition is called deadlock.
Photo in the article by “Wikimedia Commons”
Answer
Deadlock can occur in a situation when a thread is waiting for an object lock, that is acquired by another thread and second thread is waiting for an object lock that is acquired by first thread. Since, both threads are waiting for each other to release the lock, the condition is called deadlock.
Photo in the article by “Wikimedia Commons”
Code:
https://commons.wikimedia.org/wiki/File:Firefox_OS_Cymraeg_-_Welsh._Sgrin_gartref_-_Home_screen.png