mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-03 04:22:47 -05:00
Put an optional IdempotentCallback in packet queues.
This means that someone putting things on a packet queue doesn't need to separately hold a pointer to someone who needs notifying about it, or remember to call the notification function every time they push things on the queue. It's all taken care of automatically, without having to put extra stuff at the call sites. The precise semantics are that the callback will be scheduled whenever _new_ packets appear on the queue, but not when packets are removed. (Because the expectation is that the callback is notifying whoever is consuming the queue.)
This commit is contained in: