folly::UnboundedBlockingQueue::try_take_for

Try to remove an item, waiting at most the given duration.

Synopsis

Declared in <folly/executors/task_queue/UnboundedBlockingQueue.h>

folly::Optional<T>
try_take_for(std::chrono::milliseconds time) override;

Return Value

The dequeued item, or folly::none if the wait timed out.

Parameters

NameDescription
timeThe maximum time to wait for an item.