Until the lock becomes effective (that is until some thread actually "hangs" on the lock) it's just a memory structure. Later it depends on the implementation of locking mechanisms on a particular platform.
Until the lock becomes effective (that is until some thread actually "hangs" on the lock) it's just a memory structure. Later it depends on the implementation of locking mechanisms on a particular platform.
Probably around 5000, but how many would actually be utilized, or even allocated would depend on the session. Probably not often near than many.
As followup, I was going to put the lock around a collection at the hash bucket level, rather than lock the whole collection when adding or removing. So there would be 1 per bucket.
Should I (or is it possible) just to have a semaphore that holds the read/write locks. I doubt I'd run into many instances of a lot of simultaneous writes to the collection.
Well, I'm new to c++, visual studio, Qt, Qt creator and coding multi-threaded applications --- should I add GDB to that too? Is there any books/papers on how to setup gdb with Qt/VS2010 to debug?
You don't have to setup anything. Actually if you're using VS2010 and MSVC then you should use the native Visual Studio debugger. Just click on the "Debug"
button in the IDE to start debugging. You might want to set some breakpoints first.
Bookmarks