| 2772 | } |
| 2773 | |
| 2774 | static void request(struct ArrowAsyncProducer* producer, int64_t n) { |
| 2775 | auto* self = reinterpret_cast<State*>(producer->private_data); |
| 2776 | { |
| 2777 | std::lock_guard<std::mutex> lock(self->mutex_); |
| 2778 | if (!self->error_.ok()) { |
| 2779 | return; |
| 2780 | } |
| 2781 | self->pending_requests_ += n; |
| 2782 | } |
| 2783 | self->cv_.notify_all(); |
| 2784 | } |
| 2785 | |
| 2786 | static void cancel(struct ArrowAsyncProducer* producer) { |
| 2787 | auto* self = reinterpret_cast<State*>(producer->private_data); |