westonpace commented on a change in pull request #11286: URL: https://github.com/apache/arrow/pull/11286#discussion_r728903836
########## File path: python/pyarrow/tests/test_dataset.py ########## @@ -3389,6 +3392,73 @@ def test_write_dataset_with_scanner(tempdir): ) == table.drop(["a"]).to_pydict() +def test_write_dataset_with_backpressure(tempdir): + consumer_gate = threading.Semaphore(0) + + class GatingFs(ProxyHandler): + def open_output_stream(self, path, metadata): + consumer_gate.acquire(1) + return self._fs.open_output_stream(path, metadata=metadata) Review comment: I added a comment and switched to using `threading.Event`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org