Top "Locking" questions

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

How do filesystems handle concurrent read/write?

User A asks the system to read file foo and at the same time user B wants to save his …

filesystems locking
How long will a C# lock wait, and what if the code crashes during the lock?

I saw the following code, and wanted to use it for a simple activity which may only be executed one …

c# locking
Screen orientation lock

Is there a reliable way to lock screen orientation on all Android devices? The code below works for my Nexus …

android locking rotation screen orientation
How to improve INSERT INTO ... SELECT locking behavior

In our production database, we ran the following pseudo-code SQL batch query running every hour: INSERT INTO TemporaryTable (SELECT FROM …

mysql select insert locking innodb
Java Synchronized Block for .class

What does this java code mean? Will it gain lock on all objects of MyClass? synchronized(MyClass.class) { //is all …

java multithreading synchronization locking synchronized
Using WITH NOLOCK Table Hint in Query Using View - Does it Propagate Within the View?

If a "WITH NOLOCK" query hint is used on a View in SQL Server, does it propagate that hint to …

sql sql-server locking
run command/script when lock/unlock windows station?

I have Windows 7 pro at work. My problem is I keep on forgetting to clock in/clock out (using the …

windows scripting command locking unlock
std::lock_guard or std::scoped_lock?

C++17 introduced a new lock class called std::scoped_lock. Judging from the documentation it looks similar to the already …

c++ multithreading locking c++17
How expensive is the lock statement?

I've been experimenting with multi threading and parallel processing and I needed a counter to do some basic counting and …

c# .net multithreading locking parallel-processing
What's the difference between PESSIMISTIC_READ and PESSIMISTIC_WRITE in JPA?

I have read the article Locking and Concurrency in Java Persistence 2.0, and run the sample application. But i still cant …

java jpa locking pessimistic