Add cancellation support for folly::coro::UnboundedQueue::dequeue()
Summary: Adds the ability to request cancellation of the folly::coro::UnboundedQueue's dequeue() operation by injecting a CancellationToken using co_withCancellation(). Most of the work for supporting this was implemented in the change to Semaphore::co_wait() to support cancellation. This diff just adds some tests for cancellation of UnboundedQueue::dequeue() and provides a more efficient code-path for the cancellation-case that does not involve throwing an exception. Reviewed By: yfeldblum Differential Revision: D21555325 fbshipit-source-id: 7fbae8aa426b40bbea4d0d6dec85df4bad813733
Showing
Please register or sign in to comment