| 586 | |
| 587 | #ifdef ARROW_ENABLE_THREADING |
| 588 | void EmitBatches() { |
| 589 | while (true) { |
| 590 | // Implementation note: If the queue is empty, we will block here |
| 591 | if (process_queue.WaitAndPop() == kPoisonPill) { |
| 592 | EndFromProcessThread(); |
| 593 | } |
| 594 | // Either we're out of data or something went wrong |
| 595 | if (!PollOnce()) { |
| 596 | return; |
| 597 | } |
| 598 | } |
| 599 | } |
| 600 | |
| 601 | /// The entry point for processThread |
| 602 | static void StartPoller(SortedMergeNode* node) { node->EmitBatches(); } |