From 5bfd3621c8ff4392dc236b395d32055a0c78e5f1 Mon Sep 17 00:00:00 2001 From: Michael Macias Date: Tue, 29 Aug 2023 11:46:59 -0500 Subject: [PATCH] bgzf/multithreaded_reader: Add position getter --- noodles-bgzf/src/multithreaded_reader.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/noodles-bgzf/src/multithreaded_reader.rs b/noodles-bgzf/src/multithreaded_reader.rs index 9632cfc13..dc72eba16 100644 --- a/noodles-bgzf/src/multithreaded_reader.rs +++ b/noodles-bgzf/src/multithreaded_reader.rs @@ -66,6 +66,11 @@ impl MultithreadedReader { } } + /// Returns the current position of the stream. + pub fn position(&self) -> u64 { + self.position + } + /// Shuts down the reader and inflate workers. pub fn finish(&mut self) -> io::Result<()> { self.recycle_tx.take();