tustvold commented on code in PR #8021:
URL: https://github.com/apache/arrow-datafusion/pull/8021#discussion_r1379309440
##########
datafusion/core/tests/fifo.rs:
##########
@@ -172,48 +308,27 @@ mod unix_test {
Equal,
}
- fn create_writing_thread(
- file_path: PathBuf,
- header: String,
- lines: Vec<String>,
- waiting_lock: Arc<AtomicBool>,
- wait_until: usize,
- ) -> JoinHandle<()> {
- // Timeout for a long period of BrokenPipe error
- let broken_pipe_timeout = Duration::from_secs(10);
- // Spawn a new thread to write to the FIFO file
- thread::spawn(move || {
- let file = OpenOptions::new().write(true).open(file_path).unwrap();
- // Reference time to use when deciding to fail the test
- let execution_start = Instant::now();
- write_to_fifo(&file, &header, execution_start,
broken_pipe_timeout).unwrap();
- for (cnt, line) in enumerate(lines) {
- while waiting_lock.load(Ordering::SeqCst) && cnt > wait_until {
Review Comment:
I had some difficulty following the various locking, etc... I think the new
implementation is broadly equivalent, but I may be missing some nuance
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]