Skip to content

Commit 9df2d4e

Browse files
authored
Add ReadHandle::factory (#99)
1 parent 8ca7910 commit 9df2d4e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/read.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ impl<T> ReadHandle<T> {
9898
_unimpl_send: PhantomData,
9999
}
100100
}
101+
102+
/// Create a [`ReadHandleFactory`] which is `Send` & `Sync` and can be shared across threads to create
103+
/// additional [`ReadHandle`] instances.
104+
pub fn factory(&self) -> ReadHandleFactory<T> {
105+
ReadHandleFactory {
106+
inner: Arc::clone(&self.inner),
107+
epochs: Arc::clone(&self.epochs),
108+
}
109+
}
101110
}
102111

103112
impl<T> ReadHandle<T> {

0 commit comments

Comments
 (0)