Introduce packetqueue::stop which just sets the deleting flag and sends out a notify. The idea is to call it before clear().

This commit is contained in:
Isaac Connor committed 2022-05-12 11:02:19 -04:00
1 parent 3410d85302
commit 7ec97403d2
2 files changed
+6

No files matched your search

+5
View File
@@ -364,6 +364,11 @@ void PacketQueue::clearPackets(const std::shared_ptr<ZMPacket> &add_packet) {
return;
} // end voidPacketQueue::clearPackets(ZMPacket* zm_packet)
void PacketQueue::stop() {
deleting = true;
condition.notify_all();
}
void PacketQueue::clear() {
deleting = true;
condition.notify_all();