signal-synchronization in writeBegin() and writeEnd()
correctly remove member under error condition in tap_handler() while holding the mutex