Implement reservoir using mutex