Added synchronization for incoming_buffer read/writes