ENH: try a higher level locking mechanism