Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
Name some of the most common places to look for a Deadlock in C#.
Home
C Sharp
Name some of the most common places to look for a Deadlock in C#.
+1
vote
asked
Apr 9, 2020
in
C Sharp
by
GeorgeBell
Name some of the most common places to look for a Deadlock in C#.
#common-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Apr 9, 2020
by
GeorgeBell
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)
...