Wednesday, January 30th, 2008
Here’s a bit of code I extracted from my own special baby of an application. It allows me to lock on a specific "name", rather than having to use an object instance and the built in lock construct.
Usage
NamedLock<string> locker = new NamedLock<string>();
var url = "http://services.digg.com…";
using (locker.Lock(url))
{
//Do something synchronized
[...]
Monday, December 3rd, 2007
In my quest to make SubSonic work for me, I’ve been stumbling through the source code and making improvements on my own super special branch. Of primary interest to me was the mechanism for loading objects related through a foreign key. A Review object might have a parent Author, accessible like so:
Review review = new [...]
Monday, November 12th, 2007
I started extracting some caching code into a more reusable class this week. It comes from one of my favorite applications, which has ~10,000 objects cached at any given time. I figured I’d start this blog off the right way and show off one of my more boneheaded code decisions.
Data in the applications I deal [...]