Added "with" syntactic sugar to thread locking session module

darcs-hash:20090217161023-58103-d15edf101fb59329bf3b6f09ec5e8afa524a39bd