Could you add a comment here on the need to unlock the bucket on the same thread that locks it? It took me a while to realize why this was needed...