Persistent Systems Interview Question

How can you handle queue overflow?

Interview Answer

Anonymous

Jan 14, 2021

try { MsgQueue.insert(xxx) } catch (std::bad_alloc & e) { //Add logic to handle queue overflow }