Whoops -- this should have been:

```
if (m_bSerializeWrites) {
    m_serializationMutex.lock();
}
int result = m_receiver_messages.write(messages, count);
if (m_bSerializeWrites) {
    m_serializationMutex.unlock();
}
return result;
```