Top "Locking" questions

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

What is the Re-entrant lock and concept in general?

I always get confused. Would someone explain what Reentrant means in different contexts? And why would you want to use …

multithreading locking pthreads
What is the best way to open a file for exclusive access in Python?

What is the most elegant way to solve this: open a file for reading, but only if it is not …

python file locking
Python sharing a lock between processes

I am attempting to use a partial function so that pool.map() can target a function that has more than …

python locking multiprocessing share
Forcing a query timeout in SQL Server

We have had an issue with a block of code that responds poorly in the face of slow databases (It …

sql-server testing timeout locking
How to prevent screen lock on my application with swift on iOS

How can I prevent screen lock only when using Navigation? Waze has the option to do that, how can I …

ios swift locking screen
ZooKeeper alternatives? (cluster coordination service)

ZooKeeper is a highly available coordination service for data centers. It originated in the Hadoop project. One can implement locking, …

locking cluster-computing high-availability heartbeat apache-zookeeper
synchronized block - lock more than one object

I'm modelling a game where multiple players (threads) move at the same time. The information of where a player is …

java multithreading locking synchronized
Oracle select for update behaviour

The problem we try to solve looks like this. We have a table full of rows which represent cards. The …

sql oracle locking blocking
Java : Does wait() release lock from synchronized block

I was under the impression that wait() releases all locks but I found this post which says "Invoking wait inside …

java multithreading concurrency locking wait
How would you implement your own reader/writer lock in C++11?

I have a set of data structures I need to protect with a readers/writer lock. I am aware of …

c++ multithreading c++11 locking readwritelock