Top "Locking" questions

Locking allows different types of resources to be used exclusively by one process at a time.

Java synchronized method lock on object, or method?

If I have 2 synchronized methods in the same class, but each accessing different variables, can 2 threads access those 2 methods at …

java multithreading thread-safety locking synchronized
Show all current locks from get_lock

Is there any way to select / show all current locks that have been taken out using the GET_LOCK function? …

mysql locking
Why is lock(this) {...} bad?

The MSDN documentation says that public class SomeObject { public void SomeOperation() { lock(this) { //Access instance variables } } } is "a problem if …

c# multithreading locking
How to disable Home and other system buttons in Android?

I need to disable Home and other system buttons in my Android application. Example: MX Player (see at Google Play) …

android locking kiosk
Volatile vs. Interlocked vs. lock

Let's say that a class has a public int counter field that is accessed by multiple threads. This int is …

c# multithreading locking volatile interlocked
SQL Server - How to lock a table until a stored procedure finishes

I want to do this: create procedure A as lock table a -- do some stuff unrelated to a to …

sql sql-server tsql stored-procedures locking
What is a deadlock?

When writing multi-threaded applications, one of the most common problems experienced are deadlocks. My questions to the community are: What …

multithreading concurrency locking deadlock
Recursive Lock (Mutex) vs Non-Recursive Lock (Mutex)

POSIX allows mutexes to be recursive. That means the same thread can lock the same mutex twice and won't deadlock. …

multithreading locking mutex deadlock recursive-mutex
Confused about UPDLOCK, HOLDLOCK

While researching the use of Table Hints, I came across these two questions: Which lock hints should I use (T-SQL)? …

sql-server tsql sql-server-2008 concurrency locking
LINK : fatal error LNK1104: cannot open file 'D:\...\MyProj.exe'

Using Visual Studio 2010, when I build + run my application in short intervals I often get the following error. If I …

visual-studio visual-studio-2010 locking executable