locking Questions

6

Solved

How can I prevent screen lock only when using Navigation? Waze has the option to do that, how can I do this in my App?
Lafleur asked 4/2, 2015 at 18:55

8

Solved

I have the following class. class Test{ public HashSet<string> Data = new HashSet<string>(); } I need to change the field "Data" from different threads, so I would like some opinion...
Untitled asked 20/9, 2013 at 17:57

3

Solved

There is a multithreads application, that works with large DB file (>600 Mb). "Database is locked" problem started when I added blob data, and started operate with >30 Kb of BLOB data per request. ...
Nammu asked 22/11, 2011 at 13:43

6

Solved

I would like to unlock screen and switching it on to show a popup on an event trigger. I am able to unlock the screen using newKeyguardLock = km.newKeyguardLock(HANDSFREE); newKeyguardLock.disable...
Geometry asked 23/5, 2010 at 10:21

3

I kinda understand the purpose of entity locking and transaction isolation level, but can't get the difference between pessimistic locking and serializable level. As I understand, in both cases the...
Lientery asked 22/11, 2017 at 17:50

6

Solved

Here is the context of my problem: a gitlab ci yml pipeline several jobs in the same internship all jobs use a task gradle requiring the use of his cache all jobs share the same gradle cache ...
Brie asked 30/1, 2019 at 16:43

6

Solved

I have a function in C# that can be called multiple times from multiple threads and I want it to be done only once so I thought about this: class MyClass { bool done = false; public void DoSomet...
Rentfree asked 28/4, 2011 at 12:8

9

Solved

I am trying to understand a paper on concurrent B-tree, in which the author mentioned latch vs lock, and how latches do not need a "Lock Manager". I have been trying to figure out what are differen...
Chuckwalla asked 24/6, 2010 at 15:27

10

Solved

I am having a problem with version control in Subversion. I checked out a working copy from respository and got locks on all of its files. Then, without releasing the locks I have deleted the folde...
Scalar asked 1/7, 2010 at 5:18

2

Will flock or lockf work on a directory? I there another way to lock a directory in C on a linux machine?
Diez asked 11/1, 2012 at 9:31

3

I have an application that use a lot of socketio request and I make bulk request. When receiving the data, I have to iterate through a list to add and remove item: List carlist; void receiveDat...
Hake asked 31/7, 2014 at 19:16

1

When accessing critical section in C# with async/await keywords, using lock keyword or Monitor is generally not advised (Why can't I use the 'await' operator within the body of a lock s...
Dally asked 16/7, 2020 at 21:55

2

Solved

I need to open a log file for writing. Trouble is, many things may do this at the same time, and I don't want conflicts. Each write will be a single line, generally about 150 bytes (and always less...
Moskowitz asked 26/6, 2012 at 17:18

1

I recently had the need to add an asynchronous variant of the lock keyword to one of my applications. There are many implementations to choose from, but the two that most appealed to me were: Asyn...
Makassar asked 26/2, 2023 at 8:55

9

Solved

The await keyword in C# (.NET Async CTP) is not allowed from within a lock statement. From MSDN: An await expression cannot be used in a synchronous function, in a query expression, in the catch o...
Dongdonga asked 30/9, 2011 at 15:23

8

I want to track mutual locks in postgres constantly. I came across Locks Monitoring article and tried to run the following query: SELECT bl.pid AS blocked_pid, a.usename AS blocked_user, kl.pid...
Tetreault asked 21/10, 2014 at 14:30

2

I've an android application that will be used in a restaurant, so I want that users can't exit from the app. The only thing that users can, is using application. (If possible only admin can exit fr...
Chromatophore asked 7/4, 2013 at 11:44

2

Playing with Binding and Environment Adjustments in R , we have this 3 functions: lockEnvironment(env) locks env so you can't add a new symbol to env. lockBinding(sym, env) locks the sym within e...
Cutoff asked 2/10, 2013 at 8:5

18

Solved

When writing multi-threaded applications, one of the most common problems experienced are deadlocks. My questions to the community are: What is a deadlock? How do you detect them? Do you hand...
Efrainefram asked 29/8, 2008 at 15:56

2

Solved

The documentation for Django 2.2, which I'm using, gives the following example usage for select_for_update: from django.db import transaction entries = Entry.objects.select_for_update().filter(aut...
Cleric asked 23/7, 2021 at 13:42

10

Query: SELECT COUNT(online.account_id) cnt from online; But online table is also modified by an event, so frequently I can see lock by running show processlist. Is there any grammar in MySQL th...
Ascus asked 27/5, 2009 at 19:43

8

Solved

From Head First design patterns book, the singleton pattern with double checked locking has been implemented as below: public class Singleton { private volatile static Singleton instance; priva...
Diffractometer asked 21/10, 2011 at 21:53

4

Solved

I have a piece of code (simplified): if(reentrantLockObject.isLocked()) { reentrantLockObject.unlock(); } where reentrantLockObject is java.util.concurrent.locks.ReentrantLock. Sometimes I get...
Paramedical asked 11/5, 2010 at 13:51

4

I have got the following code: public void Update(Foo foo) { lock(_locker) { UpdateFirstPart(foo.First); UpdateSecondPart(foo.Second); UpdateThirdPart(foo.Third); } } public class Foo {...
Rigveda asked 23/10, 2017 at 11:46

2

Solved

I am using EF Core 6 vs a SQL Server DB. Sometimes, the execution of a SELECT query takes more than 30 seconds, and goes in timeout. If I execute the very same SQL generated by EF Core (with the ve...
Intradermal asked 21/7, 2022 at 22:47

© 2022 - 2024 — McMap. All rights reserved.