critical-section Questions
1
Solved
Please pardon my slightly humorous title. I use two different definitions of the word 'safe' in it (obviously).
I am rather new to threading (well, I have used threading for many years, but only v...
Decanter asked 7/1, 2012 at 13:13
5
Solved
I'm looking for a way to debug a rare Delphi 7 critical section (TCriticalSection) hang/deadlock. In this case, if a thread is waiting on a critical section for more than say 10 seconds, I'd like t...
Cosmopolite asked 15/9, 2010 at 16:45
2
Solved
Is there any circumstance in which the LockCount field of a RTL_CRITICAL_SECTION structure in Windows can legitimately be negative?
We're tracking a VERY elusive crash and one symptom we're seeing...
Reshape asked 13/9, 2011 at 21:23
2
Solved
I just read a MSDN article, "Synchronization and Multiprocessor Issues", that addresses memory cache consistency issues on multiprocessor machines. This was really eye opening to me, because I woul...
Postaxial asked 28/8, 2011 at 19:16
3
Solved
My program is randomly crashing in a small scenario I can reproduce, but it happens in mlock.c (which is a VC++ runtime file) from ntdll.dll, and I can't see the stack trace. I do know that it happ...
Perfuse asked 19/8, 2011 at 15:18
2
Solved
For my cross-platform application I have started to use Boost, but I can't understand how I can implement code to reproduce behavior of Win32's critical section or .Net's lock.
I want to write a m...
Latrena asked 15/8, 2011 at 15:12
8
Solved
We have a D2007 application whose memory footprint grows steadily when running on Windows Server 2008 (x64, sp1).
It behaves normally on Windows Server 2003 (x32 or x64), XP, etc... where it goes u...
Incrassate asked 23/4, 2009 at 2:19
1
Solved
Suppose we have a shared queue (implemented using an array), which two threads can access, one for reading data from it, and other for writing data to it. Now, I have a problem of synchronization. ...
Thomasenathomasin asked 27/7, 2011 at 4:27
4
Solved
I'm working through an example of protecting a global double using mutexes, however I get the error -
Unhandled exception at 0x77b6308e in
Lab7.exe: 0xC0000005: Access violation
writing locati...
Plasterwork asked 12/5, 2011 at 14:49
4
Solved
CRITICAL_SECTION locking (enter) and unlocking (leave) are efficient because
CS testing is performed in user space without making the kernel system call that
a mutex makes. Unlocking is perform...
Motorboat asked 3/3, 2011 at 2:51
3
Solved
Just want a little clarity on the this.
Imagine I use the windows api of EnterCriticalSection. I call all of them with EnterCriticalSection(&criticalsection);
This is the thread function that ...
Acrylyl asked 9/4, 2011 at 19:2
3
Here's the deal. My app has a lot of threads that do the same thing - read specific data from huge files(>2gb), parse the data and eventually write to that file.
Problem is that sometimes it could...
Mesomorphic asked 19/3, 2011 at 9:1
1
Solved
The API method InitializeCriticalSectionAndSpinCount allows you to set a spin count so when EnterCriticalSection is called, it loops using a spinlock to try to acquire the resource some number of t...
Pork asked 17/12, 2010 at 21:16
2
Solved
Few months back, I had come across this interesting scenario asked by a guy (on orkut). Though, I've come up with a "non-portable" solution to this problem (have tested it with small code), but sti...
Greg asked 30/11, 2010 at 11:50
1
Solved
If the application is targeted on Windows Vista or later, could we replace all critical sections with SRW locks? Since critical section is mutually exclusive, for usage it is equivalent to SRW lock...
Lek asked 17/8, 2010 at 2:1
3
Solved
I'm creating an console application which needs to run several threads in order to accomplish a task. My problem is that threads are running one after another (thread1 start -> work -> end and ONLY...
Regatta asked 27/6, 2010 at 7:37
3
Solved
I have a situation where a block of code should be executed only if two locker objects are free.
I was hoping there would be something like:
lock(a,b)
{
// this scope is in critical region
}
...
Coletta asked 20/5, 2010 at 13:17
2
Solved
As part of Vista certification, Microsoft wants to make sure that an application exits without holding on to a lock (critical section):
TEST CASE 31. Verify application does not break into a deb...
Fruition asked 12/5, 2010 at 12:43
3
Solved
Does having 2 different threads :
one reading from a C# array (e.g from first location),
and another one writing to the same C# array but to a different location(e.g to the last location)
is t...
Odoriferous asked 9/5, 2010 at 19:38
3
Solved
It seems that using Critical Sections quite a bit in Vista/Windows Server 2008 leads to the OS not fully regaining the memory.
We found this problem with a Delphi application and it is clearly beca...
Matteson asked 30/4, 2009 at 0:6
2
Solved
In Windows environment, is Boost's scoped mutex using WinAPI's critical sections, or something else?
Staceestacey asked 18/5, 2009 at 12:52
6
Solved
I need to work with array from several threads, so I use CRITICAL SECTION to give it an exclusive access to the data.
Here is my template:
#include "stdafx.h"
#ifndef SHAREDVECTOR_H
#define SHARED...
Bellebelleek asked 21/12, 2008 at 20:34
3
Solved
I have a list wrapper that maintains two Tstringlists and a TClassList
I need this to be thread safe, such that:
Concurrent writes are not allowed (wait state of some sort should be entered)
Rea...
Belicia asked 19/11, 2008 at 16:54
© 2022 - 2024 — McMap. All rights reserved.