Closed tshauck closed 6 months ago
Thanks for reporting! Repository
was intended to allow concurrent access, which is why the adapter has a readers-writer lock.
noodles 0.65.0 / noodles-fasta 0.33.0 makes Repository
thread-safe (i.e., Send
+ Sync
).
Thanks!
Hi, thanks as always for this library.
I'm seeking help in understanding how or if I could use the
Repository
associated with a CRAM file inSend
-able fashion?Repository
is a tuple struct:pub struct Repository(Rc<RwLock<AdapterCache>>)
, and I thinkRc
isn'tSend
-able (which may make this a non-starter).FWIW, the end goal is to stream records similar to this example: https://github.com/zaeleus/noodles/blob/adb6f05cb9a08116bb9f89b9ee4dcf7a1ff469aa/noodles-cram/examples/cram_view_async.rs though I can share a better example if it'd be helpful.
Any advice you could give toward that end would be helpful, thanks!