Allow AtomicNotificationQueue consumers to discard dequeued tasks
Summary: If `Consumer::operator()` returns `AtomicNotificationQueueTaskStatus` then this value indicates if the consumer actually consumed the task, or if it should be discarded. Enumerating all cases: `operator()` return type is `void`: *All tasks are considered consumed and counted towards `maxReadAtOnce`.* `operator()` returns `AtomicNotificationQueueTaskStatus::CONSUMED`: *Same as above.* `operator()` returns `AtomicNotificationQueueTaskStatus::DISCARD`: *Task does not count towards `maxReadAtOnce` and is silently discarded. The consumer is responsible for any cleanup other than calling the destructor.* Reviewed By: andriigrynenko Differential Revision: D24698221 fbshipit-source-id: 0da2364d18b67468addf737b67cae573c89b7e9c
Showing
Please register or sign in to comment