Click here to Skip to main content
15,884,093 members
Home / Discussions / C#
   

C#

 
GeneralRe: find solution for deadlock Pin
numeracy11-Apr-12 1:00
numeracy11-Apr-12 1:00 
GeneralRe: find solution for deadlock Pin
Pete O'Hanlon11-Apr-12 1:40
mvePete O'Hanlon11-Apr-12 1:40 
GeneralRe: find solution for deadlock Pin
numeracy11-Apr-12 1:05
numeracy11-Apr-12 1:05 
GeneralRe: find solution for deadlock Pin
Pete O'Hanlon11-Apr-12 1:06
mvePete O'Hanlon11-Apr-12 1:06 
GeneralRe: find solution for deadlock Pin
numeracy11-Apr-12 1:11
numeracy11-Apr-12 1:11 
GeneralRe: find solution for deadlock Pin
Pete O'Hanlon11-Apr-12 1:13
mvePete O'Hanlon11-Apr-12 1:13 
AnswerRe: find solution for deadlock Pin
Luc Pattyn11-Apr-12 3:39
sitebuilderLuc Pattyn11-Apr-12 3:39 
AnswerRe: find solution for deadlock PinPopular
BobJanova11-Apr-12 1:12
BobJanova11-Apr-12 1:12 
This has a huge smell of homework about it, as this is a clearly contrived example. The simple answer is, you should never nest locks if you can possibly avoid it, and if you have to lock on multiple things simultaneously (which should be rare), you need to do it in a consistent order (i.e. always lock on obj1 and then obj2).

Since this example is so contrived it's not possible to have a sensible discussion about it; neither F1 nor F2 actually requires exclusive access to anything so the correct solution here wouldn't lock at all.
AnswerRe: find solution for deadlock Pin
numeracy11-Apr-12 12:29
numeracy11-Apr-12 12:29 
QuestionHow to destroy a child WinForm after operation? Pin
fantasy121511-Apr-12 0:20
fantasy121511-Apr-12 0:20 
AnswerRe: How to destroy a child WinForm after operation? Pin
Wes Aday11-Apr-12 0:46
professionalWes Aday11-Apr-12 0:46 
QuestionHow to make label font auto fit Pin
stevenlei10-Apr-12 23:39
stevenlei10-Apr-12 23:39 
AnswerRe: How to make label font auto fit Pin
Pete O'Hanlon11-Apr-12 0:12
mvePete O'Hanlon11-Apr-12 0:12 
GeneralRe: How to make label font auto fit Pin
stevenlei11-Apr-12 4:44
stevenlei11-Apr-12 4:44 
GeneralRe: How to make label font auto fit Pin
Pete O'Hanlon11-Apr-12 5:56
mvePete O'Hanlon11-Apr-12 5:56 
AnswerRe: How to make label font auto fit Pin
Ravi Bhavnani11-Apr-12 18:49
professionalRavi Bhavnani11-Apr-12 18:49 
QuestionDropdown list question Pin
R@vuri10-Apr-12 19:03
R@vuri10-Apr-12 19:03 
AnswerRe: Dropdown list question Pin
Abhinav S10-Apr-12 19:37
Abhinav S10-Apr-12 19:37 
AnswerRe: Dropdown list question Pin
V.10-Apr-12 20:29
professionalV.10-Apr-12 20:29 
GeneralC# code Pin
R@vuri10-Apr-12 17:50
R@vuri10-Apr-12 17:50 
AnswerRe: C# code Pin
Karthik Harve10-Apr-12 18:09
professionalKarthik Harve10-Apr-12 18:09 
GeneralRe: C# code Pin
R@vuri10-Apr-12 18:50
R@vuri10-Apr-12 18:50 
GeneralRe: C# code Pin
Abhinav S10-Apr-12 19:39
Abhinav S10-Apr-12 19:39 
QuestionHow to make a new MDI child form maximum size? Pin
fantasy121510-Apr-12 15:42
fantasy121510-Apr-12 15:42 
AnswerRe: How to make a new MDI child form maximum size? Pin
Karthik Harve10-Apr-12 18:17
professionalKarthik Harve10-Apr-12 18:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.