Top "Locking" questions

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

Deleting many rows without locking them

In PostgreSQL I have a query like the following which will delete 250k rows from a 1m row table: DELETE …

sql postgresql locking sql-delete
When exactly MySQL locks a row on updating InnoDB table?

If I have this multiupdate query UPDATE user u INNER JOIN user_profile up ON up.user_id = u.id …

mysql locking innodb rowlocking
Locking a method in Python?

Here is my problem: I'm using APScheduler library to add scheduled jobs in my application. I have multiple jobs executing …

python-3.x locking scheduler apscheduler
Pure-Ruby concurrent Hash

What's the best way to implement a Hash that can be modified across multiple threads, but with the smallest number …

ruby concurrency hash locking
C# Threading issue with AutoResetEvent

How to properly synchronize this? At the moment it is possible that SetData is called after e.WaitOne() has completed …

c# multithreading locking thread-safety autoresetevent
flock(): is it possible to merely check if the file is already locked, without actually acquiring the lock if not?

My use case is as follows: I have a program that enforces that only one instance of it can be …

c locking flock
devicePolicyManager.lockNow() is not working for Motorola Tablets

public final static void lockDevice() { try { if (devicePolicyManager.isAdminActive(adminComponent)) { devicePolicyManager.lockNow(); } } catch (final Exception ex) { ... } } The above code does …

android locking motorola block-device device-policy-manager
Help with understanding jstack output

I have a desktop Java/Swing application which is deployed via Java Webstart (clients are using Java 6u20 on XP). …

java locking jstack mixed-code
mysql replication - table locking?

I am currently working for a company that has a website running mysql/php (all tables are also using the …

mysql replication locking myisam
Linux Kernel Preemption during spin_lock and mutex_lock

When a process in the kernel space is holding a spin_lock, the process cannot be preempted due to any …

locking linux-kernel preemption