|
-
November 9th, 2010, 01:26 PM
#14
Re: Trying to resolve a locking thread
I was just trying to make it more readable for people, that's it. If I put it as you did, people would start asking me, "What's in RAII lock?" when it's clearly not the issue here. I knew right off the get-go that someone would pick on the synchronization part and that is why I added this line in my original statement, "PS. Please note that I'm not asking to check if my process of synchronization between threads is correct."
Also what not to know about RAII -- you simply utilize a language destructors to ensure that operations that may require release/deallocation are performed. This simply rids a sloppy programmer of a possible trouble of creating a memory leak or not releasing a lock, or missing it because of an exception. That's it. This is not a panacea since many computer languages don't even support such concept. And speaking of exceptions, the most common one that can make APIs fail is a low memory exception, but guess what, if it's thrown in one place, it is most certainly guaranteed to cascade down the program in other places so it is practically impossible for a program to get out of it gracefully. Try it on some older system, the Windows will lock up and your program's behavior won't even matter.
Last edited by ahmd; November 9th, 2010 at 01:31 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|