Looks good overall.
55 + lk.unlock(); 56 + server_requests->free_buffer(it->first); 57 + server_requests->allocate_buffer(size, format, usage); 58 + lk.lock();
I am bit wary of unlocking to perform the reallocation, as, in theory at least, it could allow other threads to come and mess up the state. Not sure if this could happen in practice in this case, but it would be good to know.
« Back to merge proposal
Looks good overall.
55 + lk.unlock(); requests- >free_buffer( it->first) ; requests- >allocate_ buffer( size, format, usage);
56 + server_
57 + server_
58 + lk.lock();
I am bit wary of unlocking to perform the reallocation, as, in theory at least, it could allow other threads to come and mess up the state. Not sure if this could happen in practice in this case, but it would be good to know.