I'm not really familiar with this. It's all new stuff that appeared while I was on vacation. But simple logic still applies:
(1) Accessing a member variable after having given up the lock that was protecting it, I think is a bad idea:
36 + give_buffer_to_client(buffer, std::move(lock));
37 framedrop_policy->swap_unblocked();
38 - give_buffer_to_client(buffer, std::move(lock));
(2) This unlock also results in a member variable no longer being safely locked. It looks like it should stay locked. Certainly it doesn't appear to do any callbacks...
28 + lock.unlock();
29 framedrop_policy->swap_now_blocking();
(3) No regression test!
Maybe I can help with that as I remember seeing the offending assertion fail for me a couple of times this week. I just need to find where...
I'm not really familiar with this. It's all new stuff that appeared while I was on vacation. But simple logic still applies:
(1) Accessing a member variable after having given up the lock that was protecting it, I think is a bad idea: to_client( buffer, std::move(lock)); policy- >swap_unblocked (); to_client( buffer, std::move(lock));
36 + give_buffer_
37 framedrop_
38 - give_buffer_
(2) This unlock also results in a member variable no longer being safely locked. It looks like it should stay locked. Certainly it doesn't appear to do any callbacks... policy- >swap_now_ blocking( );
28 + lock.unlock();
29 framedrop_
(3) No regression test!
Maybe I can help with that as I remember seeing the offending assertion fail for me a couple of times this week. I just need to find where...