Rico Mariani's Performance Tidbits

Implying no warranties and conferring no rights: "AS IS" since 1988

Browse by Tags

Tagged Content List
  • Blog Post: Using ReaderWriterLock part 3 (last in this set)

    Well I think it's raining ReaderWriterLocks this month! Jeff Richter has an article on MSDN that goes over a lot of the basics and some stuff that's a lot more than basic. And then there's Vance Morrison's March article on the subject as well. Lots of good stuff in both of those. And rounding things...
  • Blog Post: Using ReaderWriterLock part 2

    Well the trouble with simple samples like the one I provided in part 1 is that well... they're too simple. Some of the improvements that you can make in them won't work generally. But nonetheless I think there's some interesting discussion possibilities. Let's have a look at it again: public class...
  • Blog Post: Using ReaderWriterLock -- are you getting what you think you're getting?

    Oh boy, more locking problems for the weekend! Here's a more complicated lock that often gets used when it shouldn't and is avoided when it should be used. Like the other articles in this series I'll provide a bit of code and ask for comments, it's more fun that way :) OK, here's the code: public...
  • Blog Post: Putting your synchronization at the correct level -- solution

    Of course when I say "solution", I really mean "my solution" because there's not really just one way to do this. But this is an approach I like and I'll go over why I like it. Recall the code from the original problem : (there was some very interesting discussion so it's worth clicking to see what people...
  • Blog Post: Putting your synchronization at the correct level

    Continuing in what's turned into my series on locking advice, I have a new example for you of a typical problem that happens in class design. As usual I've simplified this almost to the point of being silly to illustrate the problem. Hopefully the crux of what is going on still shows through. The...
  • Blog Post: Simplify your locking strategy -- simpler is better

    Well I didn't mean to but it seems I'm writing a series of articles on locking. Based on my last posting I got several requests for a simple example of a case that could be improved with simpler locking. Here's something of that ilk that's similar to something I encountered in The Real World. The...
  • Blog Post: Locking -- Isolation -- Unit of Work -- Performance -- Solution

    A few days ago I posted a concurrency problem for commentary and I got a very nice set of responses. Now I can't say that there is any answer to this problem that I would say is universally correct but there are some interesting observations that we can/should make about the proffered code. Many of...
  • Blog Post: Locking -- Isolation -- Unit of Work -- Performance

    I've had a bit of a locking/threading theme in some of my recent postings so I thought I'd continue that with a little problem. Here's a (simplified) set of operations that is sort of an example of what you might need to do in a free threaded class. Let's assume there is one instance of this class that...
  • Blog Post: Same Resource, Same Lock or else locking won't give you the protection you need

    I sometimes see funny locking patterns because there is a mental assumption that the lock keyword (via Monitor features of the runtime) automatically guards the contents of the locked region. This isn't the case. All that is guaranteed is that only one thread can hold the monitor (i.e. the locked object...
Page 1 of 1 (9 items)