Top "Locking" questions

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

Android threading and database locking

We are using AsyncTasks to access database tables and cursors. Unfortunately we are seeing occasional exceptions regarding the database being …

android sqlite locking thread-safety android-asynctask
Destination Array not long enough?

I have a class with the following method: public List<Bike> bikesCopy { get { List<Bike> bs; …

c# list locking
Open Image from file, then release lock?

I'm using the following line of code to open an Image from a file: pictureBox1.Image = Image.FromFile("test.png"); …

c# winforms image locking
Intermittent log4net RollingFileAppender locked file issue

We are seeing an intermittent issue on development and production machines whereby our log files are not getting logged to. …

locking log4net rollingfileappender
To what level does MongoDB lock on writes? (or: what does it mean by "per connection"

In the mongodb documentation, it says: Beginning with version 2.2, MongoDB implements locks on a per-database basis for most read and …

mongodb concurrency locking
Is a bool read/write atomic in C#

Is accessing a bool field atomic in C#? In particular, do I need to put a lock around: class Foo { …

c# .net concurrency locking boolean
Python Conditional "With" Lock Design

I am trying to do some shared locking using with statements def someMethod(self, hasLock = False): with self.my_lock: …

python locking with-statement
When is ReaderWriterLockSlim better than a simple lock?

I'm doing a very silly benchmark on the ReaderWriterLock with this code, where reading happens 4x more often than writting: …

c# .net multithreading locking
How to use lock in OpenMP?

I have two pieces of C++ code running on 2 different cores. Both of them write to the same file. How …

c++ locking openmp critical-section
What is (are) difference between NOLOCK and UNCOMMITTED

I use SQL Server 2012. I write two queries but what is a different between NOLOCK and UnCommitted ? SELECT lastname, firstname …

sql sql-server sql-server-2012 locking isolation-level