title: How to lock on an integer in C#?
body: <p>Is there any way to lock on an integer in C#? Integers can not be used with lock because they are boxed (and lock only locks on references).</p>
  
  <p>The scenario is as follows: I have a forum based website with a moderation feature. What I want to do is make sure that no more than one moderator can moderate a post at any given time. To achieve this, I want to lock on the ID of the post.</p>
  
  <p>I've had a couple of ideas so far (e.g. using a dictionary&lt;int, object&gt;), but I'm looking for a better and cleaner way.</p>
  
  <p>Any suggestions?</p>