[Opensource] thread safety
larry hamel
expresso at codeguild.com
Fri Dec 6 14:05:24 PST 2002
hi,
Several multithreading problems are fixed in latest cvs, for example in SecuredDBObject, where LRU caches are read/write and therefore needed to be synchronized (as opposed to a simple, non-LRU cache where writing only takes place at initialization, only reading thereafter, which could be done with a standard HashMap and careful sync in initialization).
There is a new note about thread safety & concurrent programming in the EDG. When a developer creates a datamember in a controller (I've seen this happen), do they realize the potential pitfalls when writing in a servlet context? Chapter 6 talks about all the benefits of using controllers, so I added a "pitfalls" segment on being cautious with thread safety. (However, I can get that xmldocs target to run right now, so I can't see how the xml will be formatted.)
Running a load test on a 4-CPU server is a great way to find thread-unsafe code :-)
larry
More information about the Opensource
mailing list