folly::NotificationQueue::putMessage

Unconditionally put a message on the queue.

Synopsis

Declared in <folly/io/async/NotificationQueue.h>

template<typename MessageTT>
void
putMessage(MessageTT&& message);

Description

This method is like tryPutMessage(), but ignores the maximum queue size and always puts the message on the queue, even if the maximum queue size would be exceeded.

putMessage() may throw

  • std::bad_alloc if memory allocation fails, and may

  • std::runtime_error if the queue is currently draining

  • any other exception thrown by the MessageT move/copy constructor.

Parameters

NameDescription
messageThe message to enqueue.