Thông thường a gặp mấy loại, anh có thể chia sẻ em cách anh xử lý deadlock được không ạ
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Có bốn điều kiện cần thiết để deadlock có thể xảy ra
Và các cách đối phó với deadlock bao gồm:
Anh mới chỉ gặp loại là các thread chờ lẫn nhau thôi em ạ, một khi mà deadlock đã xảy ra rồi thì gần như không có cách nào xử lý được ngoại trừ việc restart lại server, hoặc tìm cách kill các thread đang chờ nhau đi.
Em có thể tham khảo bài viết này để biết thêm một số cách mà bọn anh phòng tránh deadlock nhé.