My understanding is that std::shared_ptr can handle the scenario described in a thread-safe manner without any external synchronization (the control block of a shared_ptr which is what is shared between instances is thread safe).
However, there may still be some races around compositor_acquire() and resizing in give_buffer_to_client() that need further investigation.
My understanding is that std::shared_ptr can handle the scenario described in a thread-safe manner without any external synchronization (the control block of a shared_ptr which is what is shared between instances is thread safe).
However, there may still be some races around compositor_ acquire( ) and resizing in give_buffer_ to_client( ) that need further investigation.