• Pranjal Raihan's avatar
    Add ability to bound AtomicNotificationQueue size · dcddc5c0
    Pranjal Raihan authored
    Summary:
    Allowing a bounded `AtomicNotificationQueue` is helpful to migrate `AsyncSocketServer` over from `NotificationQueue`.
    
    `AtomicNotificationQueue::tryPutMessage` is the same as `putMessage` but also accepts a `maxSize`. If the queue size is >= `maxSize`, the message will not be queued. The user of the queue is responsible maintaining state regarding the max size of the queue.
    
    Reviewed By: andriigrynenko
    
    Differential Revision: D24698219
    
    fbshipit-source-id: 1e3d1dc0073c65cd1803629f6a4a9b015e111b08
    dcddc5c0
AtomicNotificationQueue.h 9.93 KB