in C Sharp by
Q:

Name some of the most common places to look for a Deadlock in C#.

1 Answer

0 votes
by

For recognizing deadlocks, one should look for threads that get stuck on one of the following:

  • .Result, .GetAwaiter().GetResult(), WaitAll(), and WaitAny() (When working with Tasks)
  • Dispatcher.Invoke() (When working in WPF)
  • Join() (When working with Threads)
  • lock statements (In all cases)
  • WaitOne() methods (When working with AutoResetEvent/EventWaitHandle/Mutex/Semaphore)
Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

0 votes
asked Apr 8, 2020 in Interview Question by amita rallin
0 votes
asked Nov 9, 2020 in Drupal by sharadyadav1986
0 votes
asked May 20, 2020 in React JS by GeorgeBell
0 votes
asked May 5, 2020 in Top 100 Questions Answer by Robindeniel
0 votes
asked May 5, 2020 in Top 100 Questions Answer by Robindeniel
...