Make `PointReader` trait `Send`
Mortano opened this issue · 0 comments
I'm trying to use the Reader
type in a multithreaded context. However, Reader
is not Send
because the PointReader
trait is not Send
, which prevents any multithreaded usage as far as I can tell.
To the best of my knowledge, this would be doable by making the PointReader
trait Send
and adding explicit lifetime bounds on the Reader
type (which at the moment assumes 'static
lifetime). It would also require similar changes in the laz-rs
crate to make LasZipDecompressor
Send
as well. I will open a similar issue in the laz-rs
repository and link it here.
I implemented this in a fork which you can find here: https://github.com/Mortano/las-rs/tree/make-reader-send
With the necessary changes of the laz-rs
crate here: https://github.com/Mortano/laz-rs/tree/make-decompressor-send
Let me know if this would be a sensible change, as at least the lifetime bounds on Reader
seem to be a breaking change to me. It might also be worth discussion if these changes could be applied to the Writer
trait as well.