Linked by Thom Holwerda on Sun 9th Sep 2007 18:08 UTC, submitted by koki
BeOS & Derivatives "The primary intention of my previous article was to make it very clear why and when locking is needed in multithreaded applications. In this article, I want to present my experiences in writing a new prototype for a replacement of the document model in WonderBrush and how it is manipulated and rendered asynchronously."
Thread beginning with comment 269956
To view parent comment, click here.
To read all comments associated with this story, please click here.
tuttle
Member since:
2006-03-01

So most programmers won't understand this article at all then?


Yes. And of the maybe 20% of developers that understand the issues at hand, only a very small part will be capable of applying this correctly every single time. Besides, don't you think that the solution presented in the article is a lot of code for something so conceptually simple?

Reply Parent Score: 1

stippi Member since:
2006-01-19

You are omitting something which I mentioned in my article several times, which is that the code got _cleaner_ instead of more messy. From just the code that I posted, you wouldn't see this, but the important bit is that the rendering related code got separated out of the document model code. The ObjectSnapshot derived classes contain all sorts of code related only to rendering, while the Object derived classes are freed of it. In another words, the majority of the code that is in the snapshot would have to be _somewhere_ anyways. The code for adding the proper locking on top is very little. And it doesn't have to grow with more objects/features. The only duplication of code is in storing the object data in the object and the snapshot, but even that could be refactored. Then you would be left with very little overhead code-wise.

Reply Parent Score: 2

ModeenF Member since:
2005-07-06

Today I have a vague knowledge about multithreading and I think that to become a better c# programmer c++ have helped me a lot. When I have time I will read this article and probably understand it perhaps not everything but the I can ask (#Haiku) if I think itís interesting what better is this are on an OS I love and are using my C++ experience on. (Some day I would like to make a driver as well) and those that donít like C++ and multithreading donít read it.

I don't think anyone writes for those that don't want to read there article/books but for those that want ;)

Reply Parent Score: 1

stippi Member since:
2006-01-19

I don't see the point. "20%" is just a number you picked. If you were more arrogant, you might have picked "10%", if you were less, maybe "30%"... :-)

Yeah, maybe not all programmers might be capable of applying this correctly every time. On the other hand, my article might be helpful to some. Some might even find yet a better concept. Maybe one of those will write another article and I will learn something.

I just don't see your point.

Reply Parent Score: 2

TQH ! Member since:
2006-03-16

You are just saying that programmers write buggy code and adding a feature adds to codesize.

Features can actually reduce codesize though.

Reply Parent Score: 1