Using correct trait to enable conditional critical section for event buffer clearing.