Top "Locking" questions

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

How can I lock a directory in C on a linux machine

Will flock or lockf work on a directory? I there another way to lock a directory in C on a …

linux locking directory flock
SQL Server - Is there any such thing called 'dirty write'?

Does SQL Server allow a transaction to modify the data that is currently being modified by another transaction but hasn't …

sql-server transactions locking isolation-level
Is locking access to a bool required or is it Overkill

I have a class that is designed primarily as a POCO class, with various Threads and Tasks could read its …

c# multithreading locking readerwriterlockslim
Lock an Android Phone

Possible Duplicate: Lock the android device programatically I want to be able to lock the Android phone with a password …

java android locking device-admin
How to understand LockService and implement it correctly?

Summary of Code I have a Google Apps Script project that is used by around 80 users within a specific domain, …

google-apps-script locking
Having issues with flock() function

I have a question about how flock() works, particularly in python. I have a module that opens a serial connection (…

python locking fcntl flock
Postgres locks within a transaction

I'm having trouble understanding how locks interact with transactions in Postgres. When I run this (long) query, I am surprised …

postgresql transactions locking postgresql-9.4
Can unique_lock be used with a recursive_mutex?

According the this, unique_lock can be used for recursive locking by declaring a std::unique_lock<std::recursive_…

c++ multithreading locking recursive-mutex
Should SELECT ... FOR UPDATE always contain ORDER BY?

Let's say we execute... SELECT * FROM MY_TABLE FOR UPDATE ...and there is more than one row in MY_TABLE. …

mysql oracle locking deadlock
Relative performance of swap vs compare-and-swap locks on x86

Two common locking idioms are: if (!atomic_swap(lockaddr, 1)) /* got the lock */ and: if (!atomic_compare_and_swap(lockaddr, 0, val)) /* …

c assembly locking x86 atomic