locks Questions

1

Solved

I was thinking about using a class variable as a thread lock, since I don't like to define a lock within the global variables and also want to prevent deadlock. Does this actually work? Example: i...
Sightread asked 28/5, 2013 at 9:26

1

A program will SELECT several records from a table and update each row, while it can be executed many times, which will lead to several process will complete the same task simultaneously. H...
Arezzini asked 17/3, 2013 at 9:32

3

Solved

I have several objects inheriting from ClassA, which has an abstract method MethodA. Each of these inheriting objects can allow up to a specific number of threads simutaneously into their MethodA....
Syllogistic asked 11/1, 2013 at 14:46

1

What are best practices or work-arounds for using both multiprocessing and user threads in the same python application in Linux with respect to Issue 6721, Locks in python standard library should b...
Aladdin asked 20/10, 2012 at 0:3

1

This question is based on Synchronizing on an Integer results in NullPointerException and originated from this question Synchronizing on an Integer value I wanted to know what is the best wa...
Tello asked 15/10, 2012 at 6:50

2

Does "SELECT ... FOR UPDATE" lock joined rows in MySQL? If so, is it possible to disable this behaviour? There is nothing about this in the documentation. I've seen that Oracle supports "SELECT...
Fascinating asked 12/7, 2011 at 13:10

1

But I am synchronizing on the 'roster' object everywhere it gets new'ed. How come ? The offending code: public Roster getRoster() { if (roster == null) { return null; } if (!roster.rosterIn...
Perkins asked 16/5, 2012 at 16:13

1

Solved

I've been asked the following question and I'm not sure what the correct answer is to it: If monitors are implemented by replacing condition variables with semaphores (counters set to 0) with dow...
Adactylous asked 20/4, 2012 at 20:30

4

Solved

I am always very hesitant to bring my locks in the open, to make them public. I always try to keep the locks restricted to my implementation. Not doing that, is a recipe for deadlocks, I believe. I...
Kiowa asked 24/11, 2011 at 15:39

2

Solved

For a uni-processor, the lock algorithm is pretty simple. Lock(threadID) { Disable Interrupts If lock is already owned by same thread{ Restore Interrupts return } if lock is free { make loc...
Discomfort asked 22/4, 2011 at 21:58

4

Solved

C Programming: What happens when a thread tries to acquire a mutex lock, and fails to get it? Does it go to sleep? Will the thread be woken up when pthread_mutex_unlock(&mutex); is called? ...
Paske asked 11/3, 2011 at 0:53

1

Solved

I'm using windbg (the latest available from the MSDN download page). I'm trying to debug a deadlock in my app, and !locks would be very useful. However, it's not working: 0:023> !locks NTSDEXT...
Mcgriff asked 20/5, 2010 at 18:0

© 2022 - 2024 — McMap. All rights reserved.