Top "Locking" questions

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

Difference between manual locking and Synchronized methods

Is there any difference between this: internal class MyClass { private readonly object _syncRoot = new Object(); public void DoSomething() { lock(_syncRoot) { ... } } …

c# .net multithreading locking
Turning on screen programmatically

I would like to unlock screen and switching it on to show a popup on an event trigger. I am …

android screen locking
What is the difference between synchronized on lockObject and using this as the lock?

I know the difference between synchronized method and synchronized block but I am not sure about the synchronized block part. …

java concurrency locking synchronized synchronized-block
Distributed Lock Service

Which distributed lock service would you use? Requirements are: A mutual exclusion (lock) that can be seen from different processes/…

java timeout locking distributed-lock
Lock the Android device programmatically

I have been trying to lock the device through program. But I can't find the solution still. I want to …

android android-emulator locking device-admin
Simple Java name based locks?

MySQL has a handy function: SELECT GET_LOCK("SomeName") This can be used to create simple, but very specific, name-based …

java locking
What is the difference between Lock and RLock

From the docs: threading.RLock() -- A factory function that returns a new reentrant lock object. A reentrant lock must …

python multithreading locking reentrancy
Opposite of Object.freeze or Object.seal in JavaScript

What is the opposite of Object.freeze or Object.seal? Is there a function that has a name such as …

javascript locking freeze
ReentrantReadWriteLock: what's the difference between ReadLock and WriteLock?

What I know is: ReadLock and WriteLock affect each other somehow WriteLock is just like synchronized ReadLock seems cannot work …

java multithreading locking deadlock reentrantreadwritelock