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