Is there a way for a piece of code to determine if it's under an atomic context? I thought of doing a dummy write with a catch, but that's causing reentry in my errord when it logs.